Results 1 to 2 of 2
hi there,
i am looking for some sample shell scripts where i could run this shell scipt after my backups are done and are lying in the directory.
what i ...
- 06-14-2007 #1Just Joined!
- Join Date
- Jun 2007
- Posts
- 1
shell script [debian]
hi there,
i am looking for some sample shell scripts where i could run this shell scipt after my backups are done and are lying in the directory.
what i want to accomplish is:
to run the script after the backups are done and to delete the past tar files according to the following:
it shud delete any one file from last year
one a month in quarter
one a week
one per day for current week...
so that we dont have to manually delete those file all the time.i want to autmoate the process.
please help!!!
- 06-16-2007 #2Linux Enthusiast
- Join Date
- Aug 2006
- Posts
- 631
Try the -mtime option of find:
Read the man page of the find command.Code:find <directory> -mtime n -exec rm -f {} \;
Regards


Reply With Quote