The backup software we use is storing files in a directory and doesn't delete them. I need to delete all files that are older than 30 days. Is this possible?
Delete files that are 30 days old
Started by Pan, Nov 20 2007 09:06 AM
3 replies to this topic
#1
Posted 20 November 2007 - 09:06 AM
|
|
|
#2
Guest_Jordan_*
Posted 28 January 2008 - 06:32 AM
Guest_Jordan_*
You can add a command to the CRONTAB that will delete files that are older than 30 days. Here is the command:
The +30 specifies the amount of days. Change "<YOUR Fully qualified path to DIR>" to the directory you want to delete files from.
find <YOUR Fully qualified path to DIR> -mtime +30 -exec rm {} \;
The +30 specifies the amount of days. Change "<YOUR Fully qualified path to DIR>" to the directory you want to delete files from.
#3
Posted 21 February 2008 - 04:50 PM
What is a fully qualified path? I've heard that with domain names but never dirs!
#4
Posted 21 February 2008 - 11:38 PM
The full-path, e.g. /home/user/some/directory


Sign In
Create Account


Back to top









