Handy Bash Commands

Standard

A few commands I use frequently but sometimes forget.

Concatenate mutliple PDF files

pdftk *.pdf cat output out.pdf

Convert a PDF page to an image

convert -density 150 input.pdf -quality 90 output.png

Batch resize images

mogrify -resize 640x480 *.{png|jpeg}

Crop an image

convert input.png -crop 0x4000 output.png

Create a GIF animation from images (10s delay, loop endlessly)

convert -delay 10 -loop 0 *.png animation.gif
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s