[prev] [index] [next]

find: search for files (cont)

Examples:

# find all the HTML files below /home/jas/web
find  /home/jas/web  -name '*.html'  -print

# find all your files/dirs changed in the last 2 days
find  ~  -mtime -2  -print

# show info on files changed in the last 2 days
find  ~  -mtime -2  -type f  -exec ls -l {} \;

# show info on directories changed in the last week
find  ~  -mtime -7  -type d  -exec ls -ld {} \;

# find directories either new or with '07' in their name
find  ~  -type d  (  -name '*07*'  -o  -mtime -1  )  -print