how to delete files is older then n no of days on centos linux

By on October 22, 2011 Banner (468 x 60)

You may be having lakhs of files on a folder which is taking chunk out of you from your server.

Its hard to list all the files even on a GUI file manger on KDE or on GNOME.

Without worries, this can done with a simple command.

find /home/username/foldername -mtime +10 -exec rm {} \;

with the above command, we can delete the files older then 10 days on the location /home/username/foldername change the path that points your local OS files or folder location

Leave a Reply

Your email address will not be published. Required fields are marked *

*