[lug] A Windows user's view of linux

Nate Duehr nate at natetech.com
Tue Aug 5 21:02:45 MDT 2008


Jeffrey Haemer wrote:
> For me, this:
> 
>   find . -type f | xargs file
> 
> (and the like) is easier to type, and remember how to type, than this:
> 
>   find . -type f -exec file '{}' \;
> 
> so I switched long ago.
> 
> (I post this only because I keep running into folks who've never heard 
> of xargs.  YMMV.)

It's worth the post, for sure.

The xargs version better matches the original intentions of Unix (small 
tools that do something well, pipe to another tool) versus that stuff 
they built into find as switch options that makes you type something 
that looks like your typewriter threw up after a binge-drinking session.

(Switch options, especially in GNU tools, are the equivalent of 
bloatware in Unix.  But they're useful, so they stick.)

I've worked on some Unix systems that don't have GNU find and xargs and 
find myself reaching for the Awk & Sed book... that creates the opposite 
effect, instead of the typewriter, the admin starts binge drinking.

(Heh... just kidding.)

Nate



More information about the LUG mailing list