27 views

Find and list files older than 10 days

find ./ -mtime +10 -exec ls -ltr {} \;

Delete files older than 10 days

find ./ -mtime +10 -exec rm {} \;

be careful, rm command would delete files!

+10 -> is the number of days and this can be changed to suit your requirements

Oct 11, 2015 by | 27 views
DevOpsRun.com is LIVE!

Articles for DevOps Geeks
MobaXterm Customization
CHMOD Explained!
Bash history powerful tips
Ubuntu bash from Windows
..