The power of Linux

Having a Linux workstation that stores all my pictures and files give the ability to run simple(ish) commands and get a a whole lot of work done in one sweep.

for file in *; do mv “$file” `echo $file | tr ‘ ‘ ‘_’` ; done

This simple script run at the Linux command line will look at every fileĀ in the current directory and changes it’s name replacing every ” ” space with an _.

Then

for f in *.pdf; do convert -thumbnail x200 -background white -alpha remove “$f”[0] “${f%.pdf}.png”; done
This simple script run at the Linux command line with ImageMagick installed will look at every PDF in the current directory and create a thumb nail that is 200 pixels high.

 

About howlmc

50 something geek, who has owned way too many computers.
This entry was posted in Websites. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *