Markus Blog What’s going on Internet?

15Aug/081

Delete Files Older Than n Days

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.

Bookmark and Share

Related Article

Tagged as: Leave a comment
Comments (1) Trackbacks (0)
  1. wew.. tengs for da info.. akan dipraktekan kalo udah pake linux.. hehehee


Leave a comment


*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

No trackbacks yet.