[ start | index | login ]
start > knowledgebase > linux > misc > clean old files

clean old files

Created by abdallah. Last edited by abdallah, one year and 63 days ago. Viewed 739 times. #2
[diff] [history] [edit] [rdf]
labels
attachments
to cleanup files older than X days is easy using the find command:
find /path/to/dir -mtime +X -delete
  • use atime for last accessed time
  • use ctime for created time
  • use mtime for last modified time
Please BE CAREFUL when you run this command, it will not prompt you for permission to delete.
no comments | post comment
Powered by snipsnap.org Found a mistake in a howto? Let us know via an email to p.blikibugs at rimuhosting com.