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

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

Comments

This site uses Akismet to reduce spam. Learn how your comment data is processed.