next up previous
Next: Comparing Files with md5 Up: Tips, Tricks, and Tools Previous: Tips, Tricks, and Tools

Applying a command to a list of files

One frequently wants to execute a command on a list of files. You might imagine doing
eg1$ gzip -9v `find / -name .log`

Unfortunately, some systems have limits on the size of a command line. (Does linux?) xargs assembles and executes command lines from arguments provided on stdin. For instance:

eg2$ find / -name \*.log | xargs gzip -9v



Reece Kimball Hart
1998-03-18