Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: How do I find and delete files based on age?

by exussum0 (Vicar)
on Feb 26, 2007 at 17:32 UTC ( [id://602178]=note: print w/replies, xml ) Need Help??


in reply to Re: How do I find and delete files based on age?
in thread How do I find and delete files based on age?

Touching on what was replied to you, I'd suggest replacing "rm -rf $_" with "echo rm -rf $_" At least then you can audit it until it works perfectly. ^^
  • Comment on Re^2: How do I find and delete files based on age?

Replies are listed 'Best First'.
Re^3: How do I find and delete files based on age?
by TGI (Parson) on Feb 26, 2007 at 20:51 UTC

    I don't count myself as a newbie, but I always do a test like you suggest (print plain output) before unleashing a deletion script on my system--even if it's just a script to clean out a temp directory.

    It only takes a moment to make sure that you will be deleting what you think you will be deleting, and it is easily worth the time. How long will it take you to restore your files from backup? You have do backups, right?


    TGI says moo

Re^3: How do I find and delete files based on age?
by Moron (Curate) on Feb 26, 2007 at 17:47 UTC
    Yes, that I do agree with. And "print" if its not a shell-out. I also quite often put an echo in front of the perl -e (update: for long or multiple lines being typed in) to check that I typed what I think I typed before actually running it.

    -M

    Free your mind

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-19 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found