22Dec/110
Tutorial on Find command

Find command are useful command in linux which help you to find and search certain file or folder in your server, here is few tutorial that might help you for better understanding it.
·Find all world writable directories:
find / -perm -0002 -type d –print
·Find all world writable files:
find / -perm -0002 -type f -print find / -perm -2 ! -type l -ls
·Find files with no user:
find / -nouser -o -nogroup –print
·Find files modified in the last two days:
find / -mtime 2 -o -ctime 2
·Search and list all files from current directory and down for the string ABC:
find ./ -name "*" -exec grep -H ABC {} \;
find ./ -type f -print | xargs grep -H "ABC" /dev/null
egrep -r ABC *
·Find all files of a given type from current directory on down:
find ./ -name "*.conf" –print
·Find all user files larger than 5Mb:
find /home -size +5000000c –print
·Find all files owned by a user (defined by user id number) on
the system: (could take a long time)
find / -user 501 –print
·Find all files created or updated in the last five minutes: (Great for finding effects of make install)
find / -cmin -5
Link To This Page
1. Click inside the codebox2. Right-Click then Copy
3. Paste the HTML code into your webpage
codebox