find command along with
-exec something argument. Can I exclude some directories/name that match regex (something like rsync's
-prune be enough if I want to exclude many things?
You can exclude certain directories while using the find command under Ubuntu.
You can use the find command as follows to find all directories except tmp directory:
Find all directories except tmp and cache:
You can find all *.pl find except in tmp and root directory, enter:
For a working solution (tested on Ubuntu 12.04).
will search for mp3 files in the current folder and subfolders except in dir1 subfolder.
to exclude dir1 AND dir2.