find . -name '*.txt'
find $HOME -name 'm?'
find . | grep -v '.class' > /tmp/l
- The newer flag finds files that are newer than a specific file:
find . -newer someFile > newFiles
- The -type flag finds files that are a specific type:
find . -name 'f*' -type f # regular file
find . -name 'f*' -type d # directory
- You can also combine find and grep with the -exec flag. This is useful, but quite advanced. We may look at it a bit later, but as a note, if you ever need it, contact me and I can help.