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

(atl: plain heresy) RE: RE: RE (tilly) 1: Find files older than x days and delete them

by atl (Pilgrim)
on Aug 22, 2000 at 15:52 UTC ( #28994=note: print w/replies, xml ) Need Help??


in reply to RE: RE (tilly) 1: Find files older than x days and delete them
in thread Find files older than x days and delete them

I know this is plain, flat heresy, especially here inside the monastry, but why use perl for this at all?
find /your/path -mtime numberofdays -exec rm -f {} \;
Father, forgive me, for I have sinned ... ;-))

Andreas

Update:

Once again I am humbly admitting that merlyn and tilly made good points (see below). So now we have three chief reasons (weapons) for a perl solution:

After this confession, shall I be free? Hey, stick away from that comfy chair ...
(do you know that feeling when you should do your already late travel and time reports for your company but keep lurking around instead? Oh boy ...)
  • Comment on (atl: plain heresy) RE: RE: RE (tilly) 1: Find files older than x days and delete them
  • Download Code

Replies are listed 'Best First'.
RE: (atl: plain heresy) RE: RE: RE (tilly) 1: Find files older than x days and delete them
by merlyn (Sage) on Aug 22, 2000 at 16:01 UTC
RE (tilly): (atl: plain heresy) RE: RE: RE (tilly) 1: Find files older than x days and delete them
by tilly (Archbishop) on Aug 22, 2000 at 16:20 UTC
    Portability? :-)
RE: (atl: plain heresy) RE: RE: RE (tilly) 1: Find files older than x days and delete them
by OzzyOsbourne (Chaplain) on Aug 22, 2000 at 23:09 UTC
    I use it b/c there are several file types that I'm looking for, and I need a log. Windows Find doesn't log, and I'm not sure that you can search out multiple file types. Plus, I'm lazy. I like one click.
      Actually, you can do both.

      To search for multiple file types, type something like '*.bat;*.html' in the search box.

      To save the search critera, click File|Save Search. To save the results of the search, make sure that Options|Save Results is checked, then click File|Save Search.

      There may be a way to save the results as a text file, but I'm not aware of it. I usually just cut'n'paste if I need something like that.

      --Chris

      e-mail jcwren

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2023-01-30 04:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?