Finding files on the command line and doing something with them

By fritz

find a_directory -iname “*.zip” -exec unzip -d another_directory {} \;
This will unzip all files from a_directory into another_directory

find a_directory -iname ‘*.gif’ -or -iname ‘*.jpg’ -exec cvs add -kb {} \;
This add all image files inside a_directory to CVS as binary.

Leave a Reply