Editing (resizing, format converting, compressing) images in the command line with ImageMagick (mogrify, convert)

Resize all tif images in the current directory:

mogrify -resize 25% 25% *.tif

Resize all jpeg images in the current directory to a width of 614 pixels and keep the image ratio constant:

mogrify -resize 614 *.jpg

As above, but resize the hight to 614 pixels:

mogrify -resize x614 *.jpg

Convert all bmp imgaes in the current directory into tiff images:

mogrify -format tiff *.bmp

Compress all tiff images in the current directory with ZIP compression:

Changing sound volume or bitrate of mp3 files with lame

Sometimes the recording level of mp3 files is very low. If I do some jogging next to a busy road, I cannot hear anything even when the sound volume is on the max. Therefore I have to increase the volume of the mp3 file. Using lame you can do it with the following script:

while [ $# -ge 1 ]; do
echo $outfn
lame --mp3input -v --scale=3 $infn $outfn
shift 1

How to rescue a bad X configuration during Suse 9 install

During my first Suse9 install I screwed up X. During the configuration of X the installer suggested to me: vesa 1600x1200@75. I thought I was smarter and went to the manual configuration and selected my Nokia 445Xi monitor from the list. Then it tried to switch into the new mode and gave me buttons to adjust the settings (centering, width, etc.). I did that and after I was satisfied continued the installation. When X was supposed to start up for the first time, my screen showed only "out of synch".