find . -ctime -3# created in the past 3 daysfind . -ctime +3# older than 3 daysfind . -ctime 3# created exactly 3 days backfind . -ctime +3 -ctime -5# created 3 – 5 days backfind . -newer /tmp/somefile# see somefile’s timestamp and show files newer than it- works great in conjunction with:
touch 0607090016 /tmp/somefile#i.e. 7th june, 9:00 am, 2016find . -maxdepth 1 -type d -ctime +38 -exec rm -rf {} \;delete all folders older than 38 days back.- don’t use atime much: every directory access changes its atime, so when find traverses through it, the inode’s atime entry gets updated.