Dec 312009
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
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