Sunday, August 19, 2012

Find files created in last 24 hours in unix

This can be easily achieved by using the find command. 

find [path] [options]

See man page for detailed options of find command. 

find . -ctime -1 # finds files which are created in less then 1 day from currrent folder.
find . -ctime +2 # finds files which are created older then 2 days from currrent folder.


Enjoy. 

No comments:

Post a Comment