Computing.Net > Forums > Linux > Deleting Files that are older than 7 days

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Deleting Files that are older than 7 days

Reply to Message Icon

Name: Adrian
Date: September 13, 2000 at 07:13:49 Pacific
Comment:

How do I delete files that are older than 7 days?



Sponsored Link
Ads by Google

Response Number 1
Name: unisol
Date: September 13, 2000 at 16:18:24 Pacific
Reply:

Open a terminal/console(xterm/rxvt/eterm e.t.c).
Go to the directory where you want to start deleting (cd dir_name)
And type
find . -atime +7 -exec rm {} \;

Because this is a dangerous command i suggest you read yourself the man page (man find) to verify its correctness.I haven't fully tested it so don't blame me for the results.


0
Reply to Message Icon

Related Posts

See More


winmodem boot problem



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Deleting Files that are older than 7 days

rm files older than 3 days www.computing.net/answers/linux/rm-files-older-than-3-days/26608.html

Purging old files www.computing.net/answers/linux/purging-old-files/21781.html

Script for copying the difference www.computing.net/answers/linux/script-for-copying-the-difference/17355.html