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
Name: Adrian Date: September 13, 2000 at 07:13:49 Pacific
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.
Summary: We use the following command (from cron) on a Mandrake 9.0 system to remove log files that are more than 31 days old. /usr/bin/find /data/logs -name "*" -type f -mtime +31 -print -exec /bin/rm -f {...
Summary: Chase up rsync It compares directory1 and directory2. Updates the files in directory2 as needed to sync it directory1 and can be told to delete files that are no longer in directory1. ...