Basic Usage
$ find . -name file.txt # find a file called file.txt in current and sub-directories
$ find . -type f -name "*config.yml" # find a FILE with name containing config.yml
Useful Flags
| flags | usage |
|---|---|
| -iname | search without regard to text case |
| -type f | search for files |
| -type d | search for directories |
| -maxdepth X | search current and sub-dir X levels deep |
Find Files with Specific Pattern and Delete Them
e.g. delete all pyc within a directory
$ find . -name "*.pyc" -delete