in reply to Aging Script

Perl makes this sort of thing very easy to do. If you want to delete all files that are older than 31 days, you need to read up on the stat function -- specifically, subtract the "ctime" of the file from the current timestamp and see if it's greater than (24 * 60 * 60 * 31). Also, read up on unlink, and possibly File::Find.


perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); +$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth +er_name\n"'

Replies are listed 'Best First'.
Re: Re: Aging Script
by Seema (Novice) on Aug 09, 2001 at 01:20 UTC
    Hey arturo...
    I read the stat function, unlink, and File::Find. They really helped out. Thanx for helping me out!