find . -iname ’*.jpg’ -type f -exec rm -f {} ; from http://www.linuxforums.org/forum/newbie/100469-rm-rf-jpg-what-wrong.html find – the find program . – search the subtree starting in the current directory -iname ’*.jpg’ – find all elements that match the shell pattern ’*.jpg’. This should be done case-INsensitively -type f – only match files -exec rm -f {} ; – execute the command “rm -f {}” for each matched file, where ’{}’ is replaced with the name of the matched file.

By michael