1. Remove CVS meta directories recursively
When checking out files from CVS (or SVN), each directory in your project contains a subdirectory named CVS . If you want to use these files in another context, the following code snippet removes each subdirectory named CVS recursively:
find . -depth -name 'CVS' -exec rm -rf '{}' \;
2. Use find to locate removable disks
I use this to locate removable media that can be used for backups based on hardlinks , so we need to determine the file type
Other principles illustrated here are using the logical OR operator -o , filtering using a regular expression, limiting the depth of search, only considering directories.
find -L /media -maxdepth 1 -type d `(-fstype ext4 -o -fstype ext3 -o -fstype ext2)` -regex '/media/.*'