Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Re: untarring number of filesby Willard B. Trophy (Hermit) |
on Oct 22, 2003 at 19:36 UTC ( [id://301338]=note: print w/replies, xml ) | Need Help?? |
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. --
In Section
Seekers of Perl Wisdom
|
|