

I called it inkscape-center and run it like this: inkscape-center Inkscape -verb=EditSelectAll -verb=AlignHorizontalCenter -verb=AlignVerticalCenter -verb=FileSave -verb=FileQuit "$" While I'm at it, I might as well post the bash script I made for this: #!/bin/bash If you don't want Inkscape to do this, you can filter out any symlinks with this command: for img in $(ls *.svg) do if ] then inkscape -verb=EditSelectAll -verb=AlignHorizontalCenter -verb=AlignVerticalCenter -verb=FileSave -verb=FileQuit $img fi done For Linux only, this command will work better: for img in $(ls *.svg) do inkscape -verb=EditSelectAll -verb=AlignHorizontalCenter -verb=AlignVerticalCenter -verb=FileSave -verb=FileQuit $img doneįor the above command, if any of the files are symlinks, Inkscape will edit the target file that the symlink points to. To edit all svg images in the current directory: inkscape -verb=EditSelectAll -verb=AlignHorizontalCenter -verb=AlignVerticalCenter -verb=FileSave -verb=FileClose *.svgīut this second command opens a ton of windows, which will make your computer crash if you're editing too many images. With "foo.svg" as the image to edit: inkscape -verb=EditSelectAll -verb=AlignHorizontalCenter -verb=AlignVerticalCenter -verb=FileSave -verb=FileQuit foo.svg I found a way to do this in this question: Inkscape - Center Drawing to Page via Command Line/Terminal
