Re: Shell Script to Remove Old Files
- From: "Lew Pitcher" <lpitcher@xxxxxxxxxxxx>
- Date: 8 Mar 2007 05:41:55 -0800
On Mar 8, 12:39 am, "KAKA" <kaka....@xxxxxxxxx> wrote:
How do I write a shell script to remove files (recursively under a
directory) which is older than 6 months old? Thank you!
Dave Hinz has given you an excellent hint on /how/ to do this.
I, on the other hand, will caution you to well define what you mean by
"older than 6 months old". Remember, Unix does not capture the file /
creation/ date, so (from the file metadata) you cannot determine which
files were /created/ more than 6 months ago. The best you will be able
to do is determine which files were /last read/ or /last updated/ more
than 6 months ago.
HTH
--
Lew
.
- Follow-Ups:
- Re: Shell Script to Remove Old Files
- From: Bill Vermillion
- Re: Shell Script to Remove Old Files
- References:
- Shell Script to Remove Old Files
- From: KAKA
- Shell Script to Remove Old Files
- Prev by Date: Re: help with /etc/filesystems
- Next by Date: Re: Shell Script to Remove Old Files
- Previous by thread: Re: Shell Script to Remove Old Files
- Next by thread: Re: Shell Script to Remove Old Files
- Index(es):
Relevant Pages
|
|