Archive for the ‘*NIX’ Category

Finding files on the command line and doing something with them

2006.05.11, Thu

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.