[ale] 2 Perl questions ?

Geoffrey esoteric at 3times25.net
Wed Dec 15 10:23:39 EST 2004


Joe Sechman wrote:
> On Wed, 15 Dec 2004 08:40:18 -0600 (CST), Aditya Srinivasan
> <sriad at uab.edu> wrote:
> 
>>If you need to take some action based on a file that matches a certain criteri, use the
>>-exec switch.
> 
> Or if you need more efficiency or running into overload problems, pipe
> your find command results to xargs.
> 
> $ find / -name "test" | xargs -i ls -la {}
> 
> [OT] I read somewhere that 'xargs' is the most underutilized
> command.....is that really true, I seem to use it all the time!

The nice thing about xargs is you can limit the number of args passed to 
it per interation.

.....| xargs -n 100 blah

Point is, sometimes things will crap out on you because the list of 
'stuff' is too big.


-- 
Until later, Geoffrey



More information about the Ale mailing list