This command is usefull to resize only images greater than x in a folder.It put resized images in a folder called thumbs but you can convert file implace deleting “thumb/” string.
1 | for i in `ls *.jpg`; do convert $i -resize 800x800\> thumb/$i ; done |
You don’t need the backticks and “ls” in a for-loop
for i in `ls *.jpg`; do
can be changed to
for i in *.jpg; do
which is not only simpler but also better, safer and less expensive. If you also put double quotes around $i, that is “$i”, the command would be able to handle filenames with spaces in them. In fact, it would handle filenames with any characters in them, even radioactive characters.
Thanx David this is a great suggest…