Wednesday, March 25, 2009

Unix/Linux - find utility

find where-to-look creteria what-to-do

# find files changed in the last 1 day
find . ctime -1 -type f
# find files larger than 1 MB in /tmp
find /tmp -size 1M -type f
# find files newer than main.css in /~src
find ~/src -newer main.css
# files file with permission
find . -name -perm 664 -print

File Types (-type)
b - Block special file
c - Character special file
d - Directory
f - Plain File
p - Named Pipe File
l - Symbolic link
s - Socket

Useful Links:
http://content.hccfl.edu/pollock/Unix/FindCmd.htm

No comments:

Post a Comment