Technology Insights

How to Batch Resize Image from Linux Shell with ImageMagick

ImageMagick is a really cool product. Not only is it open source but its very powerful tool. My goal was to figure out how to batch resize images while keeping one side 640 pixels wide. I ended up using ImageMagick’s mogrify by issuing the command below at my CentOS shell prompt.

mogrify -resize x640 *.jpg


mogrify -resize 640 *.jpg

Depending on which side you want to be 640 pixels. If you would like for image magic to make the largest side 640 and constrain the proportions use the following command.

Technology Errors

[ERROR] Could not use /var/log/mysql-err.log for logging (error 13)

081004  2:35:11 [ERROR] Could not use /var/log/mysql-err.log for logging (error 13). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.

The above error displayed in the mysqld.log file fter adding the below line to /etc/my.cnf under [mysqld].


Before restarting mysql I created the file and applied the proper permissions by entering the commands below from the console.