Adsense 1

Monday, May 08, 2006

Find Files

Commands to find files:

Files modified with in 24 hours and list them

find / -mtime 1 -exec ls -l {} \;

Same but copies to /tmp

find / -mtime 1 -exec cp {} /tmp \;

Other options:
-atime n Finding files that were accessed n days ago. You can also use the +n for finding files that were accessed over n days ago, or even -n for finding files that were accessed less than n days ago.
-mtime n Same as -atime but here we find files that were modified n days ago.
-ctime n Same as -atime and -mtime but here we find files that were changed n days ago.
-newer file Find files that have been modified more recently than file.

More help here