Batch Image Editing in Linux

Must know for web developers. Many batch tools are available in imagemagick. convert and mogrify are both great! sudo apt-get imagemagick will get you going

bash$ for i in *.jpg
convert -scale ’48×38′ $i TN_$i
echo $i processed

mogrify -format jpg -quality ‘95%’ *.tiff (bulk-conversion)

For more optimized images use the following:

bash$ for i in *.jpg
djpeg $i | pnmscale -xysize 48 38 | cjpeg -opti -progr -qual ‘75%’ > TN_$i
echo $i processed

Original post here (look for Tim’s comment):

VI/VIM shortcuts

R    Overwrite text, press <Esc> to end
 :set nu    Display line numbers
G    Go to last line of the file
    :n   Go to line with this number (:10 goes to line 10)

%         Move to matching bracket:  ( { [ ] } )

/pattern/   forward to pattern

  /text   Search forward (down) for text (text can include spaces
                      and characters with special meanings.)
  ?text   Search backward (up) for text
  n       Repeat last search in the same direction
  N       Repeat last search in the opposite direction