Searching by filenames
How to match the filename of file "my_directory/myfile123.txt"
find my_directory -name *fil*
find my_directory -name *.txt*
find my_directory -name *.txt
Using regexps
find my_directory -regexp ".*le[0-9][0-9][0-9].*"
Does not work:
- \d\d\d
- [0-9]{3} (unless you use the switch: -regextype posix-extended)
Searching by modification datetime
Find all files modified in last threee days:
find -mtime -3
Exec the command
find src -name "*.gz" -exec rm {} \;