Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Delete files older than x days in Linux?

Answer:

For example, to delete files under /tmp folder, which were modified more than 6 days, use the command

find /tmp -mtime +5 | xargs rm

  1. Becareful when using the mtime option in find command
  2. Delete svn folders and files
  3. Delete files permanently with shred command
  4. How to delete a folder in Linux recursively?
  5. Stage new and modified files in Git

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>