Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: untarring number of files

by Willard B. Trophy (Hermit)
on Oct 22, 2003 at 19:36 UTC ( [id://301338]=note: print w/replies, xml ) Need Help??


in reply to Re: untarring number of files
in thread untarring number of files

Yup, but be careful of uncontrolled directory recursion there. If there were subdirectories containing tar files (or even a directory named, say "guitar"), you'd get results you wouldn't expect. Gnu find's maxdepth option is your friend.

Using find and xargs without the Gnu -print0 and -0 options is getting perilous these days. Users just don't understand that, although you can put a space in a file name, you don't want to.

xargs is also not guaranteed to operate on the entire expanded glob in one shot, calling several instances of the required command if there are more than (typically) 1024 arguments.

So maybe using Perl for this isn't such a bad idea after all.

--
bowling trophy thieves, die!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (7)
As of 2024-04-18 06:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found