On Thu, Jul 15, 2004 at 09:05:54AM +0800, John Summerfield wrote:
> I don't use  -exec on find any more because it's slow. When you pipe the 
> names into xargs as I do, then spaces cause the problem I described.

Well, until now I didnt even know about xargs' purpose, thanks for the
pointer.

> For slowness, consider this:
> [EMAIL PROTECTED]:~$ find ~ -type f | wc -l
> 886076
> [EMAIL PROTECTED]:~$ find ~ -type f -print0 | xargs -0 | wc -l
> 3990

You're right, xargs is faster (60 times in the case of ls), but only if
the actual command isn't doing very much. For md5sum there is practically
no difference in speed (have just done some measurements).

BTW, what are all those files in your home directory? I have only
about 14000 and thought that this is the biggest mess ever ;)

Regards
Matthias


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to