find tricks
Tasks I tend to forget how to perform with find(1) . Delete matched files The most trivial one: find <path> [..] -delete (e.g. find . -name foo -delete). However, depending on the OS -delete might not be available. In that case, see the next one. Execute command with matched files find <path> [..] -exec <cmd> '{}' \; is executed once for each matched file and the relative path to it is replaces '{}' and I always forget that \;, which might be omitted depending on a bunch of weird shell-isms (e.g. find . -name foo -exec rm -f '{}' \;). ...