Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^3: Deleting old files from directory

by chrestomanci (Priest)
on Sep 28, 2011 at 08:57 UTC ( #928260=note: print w/ replies, xml ) Need Help??

in reply to Re^2: Deleting old files from directory
in thread Deleting old files from directory

I use an explicit pipe to xargs instead of using the built in delete action, because that way it is easier to check I am deleting the correct files, as I can use ls on the end of the xargs command instead of rm.

Another way to handle spaces in filenames is to configure find to separate output with nulls instead of spaces, and then have xargs expect those nulls.

find <directory> <conditions> -print0 | xargs -0 ls -l

Comment on Re^3: Deleting old files from directory
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2015-11-26 18:32 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (705 votes), past polls