Re: Shell Script to Remove Old Files



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

.



Relevant Pages

  • Re: ssh authentication woes
    ... The hint was that attempting ... to capture the session using 'script' failed in openpty. ...
    (comp.security.ssh)
  • Re: Digital Video Capture: Canopus ADVC50
    ... I have been using the ADVC300, and with the limited tools, you can ... capture DV video/audio. ... (Hint, the ADVC300 tends to be the best ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Heinlein/Clarke Recommendations
    ... romances that, according to T. A. Shippey, hint at an old tale ... about the capture of Theodoric by elves. ...
    (rec.arts.sf.written)
  • Re: Vacation Form and Views
    ... Well, thanks for the hint, but I don't seem to be able to follow it. ... still cannot capture the name of the view that was being used on the ... Calendar folder before I changed it to "Events", ...
    (microsoft.public.outlook.program_forms)