http://www.thegeekstuff.com/2009/03/15-practical-linux-find-command-examples/
http://www.linux.ie/newusers/beginners-linux-guide/find.php
http://content.hccfl.edu/pollock/unix/findcmd.htm
http://www.devdaily.com/unix/edu/examples/find.shtml
https://www.hackersgarage.com/find-linux-command-cheat-sheet.html
Is there a faster and more user-friendly alternative to using the find command?
Yes. fd is a faster and more user-friendly than find. To install fd on Mac:
brew install fdHow can we find and delete files?
find -type f -name *.jsp.bak -delete
find -type f -delete // This is dangerous
find . -type f -empty
find . -type f -not -empty
find . -type d -empty
find . -type d -empty -exec rmdir {} \;How can we find files that match a particular pattern in the name?
find ./ | grep '5.06.0.12'How can we find files with size greater than 1000k?
find / -size +1000kHow can we find files that have been modified within 2 days?
find / -mtime 2How can we find files with size greater than 1000k and list files in 'ls' listing format?
find / -size +1000k -lsHow can we find files with size greater than 1000k and output extra information about these files?
find / -size +1000k -printf "%r %k\n"How can we find files older than a certain file and delete them?
find $PWD -type f ! -cnewer filename -exec rm {} \;How can we find files older than a certain file and delete them (will ask you for confirmation)?
find $PWD -type f ! -cnewer filename -ok rm {} \;
find $PWD -type f -mtime +4 -name "*.log*" ! -name "submitter.log" -ok rm {} \;How can we find files that are older than 3 days old and delete them?
find . -name "*.trc" -ctime +3 -exec rm {} \;How can we find files using regex?
find $PWD -regex '.*apache_error.*' -printfind $PWD -regex '.*apache_access.*' -print -exec rm {} \;How can we list all files and directories using the find command?
find directoryName
find directoryName -followThe -follow option directs find to follow symbolic links to directories.
How can we delete each matching file as it is found?
-exec rm -f {}\;What are the options for the find command?
| Option | Meaning |
| -atime n | File was last accessed n days ago |
| -mtime n | File was last modified n days ago |
| -newer file | File was modified more recently than the specified file was |
| -size n | File exactly n 512-byte blocks long |
| -type c | Specifies file type: f=plain file, d=directory, etc |
| -fstype type | Specifies filesystem types |
| -name name | File has the given name |
| -perm p | The permission mode is p |
| -user user | The file owner is given |
| -group grp | The file group owner is given |
| -nouser | The file owner is not listed in /path/file |
| -nogroup | The file group owner is not listed in /etc/group |
| Display the pathname of matching file | |
| -exec cmd | Execute the specified command on the file |
| -ok cmd | Execute the specified command on the file after prompting for confirmation |
| -xdev | Restrict the search to the filesystem of starting directory |
| -mount | Same as -xdev for IRIX and SCO |
| -prune | Do not descend into directories encountered |





