Re: Hashing and directories

Tobias Ringstrom (tori@tellus.mine.nu)
Fri, 2 Mar 2001 13:26:15 +0100 (CET)


On 2 Mar 2001, Oystein Viggen wrote:
> Pavel Machek wrote:
> > xargs is very ugly. I want to rm 12*. Just plain "rm 12*". *Not* "find
> These you work around using the smarter, \0 terminated, version:

Another example demonstrating why xargs is not always good (and why a
bigger command line is needed) is when you combine it with e.g. wc:

find . -type f -print0 | xargs -0 wc

You cannot trust the summary line from wc, since xargs may have decided to
run wc may times, and thus you have may summary lines. If the kernel
would allow a larger command line, you could run

wc `find . -type f`

and get exacly what you want. And if I'm not mistaken, Linux accepts a
much smaller command line than other "unices" such as Solaris.

...but it's not _that_ important... obviously there has to be an upper
limit somewhere...

/Tobias

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/