Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Aging Script

by arturo (Vicar)
on Aug 08, 2001 at 22:19 UTC ( #103146=note: print w/replies, xml ) Need Help??


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.

HTH.

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!
    ~Seema

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://103146]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2022-11-26 21:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?