Friday, November 16, 2012

find newer file that was created


Some time to locate file which was create can be time consuming as user need to
go through all directory to perform ls and compare the date the file last modify.

An easy way is to have reference file which was create at a particular time.
Have a look at this example :

# touch /tmp/ReferenceFile
.
.
.
wait for some time later and than perform a find  for file which are modify after
/tmp/ReferenceFile was created.

# find / -newer "/tmp/ReferenceFile"

No comments:

Post a Comment