Delete Files Older Than n Days
August 15th, 2008 Posted in System Administration
In Linux system you can delete old unused files (usually the session files in /tmp) all at once by running this command:
find /path/to/files* -mtime +5 -exec rm {} \;
this command will delete files which is 5 days old, if you want to change the number of days to 3 days old, then you have to change +5 to +3 and run the command again.
Tags: linux
August 16th, 2008 at 10:47 pm
wew.. tengs for da info.. akan dipraktekan kalo udah pake linux.. hehehee