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

Comments (1) Trackbacks (0)
  1. wew.. tengs for da info.. akan dipraktekan kalo udah pake linux.. hehehee


Leave a comment

(required)


*

No trackbacks yet.