Urivan Flores-Saaib wrote:
> > John H. Robinson, IV wrote
> >>find $HOME/.mozilla -name lock -print0 | xargs -0 rm
> 
> Why not:
> 
> find $HOME/.mozilla -name lock -exec rm {} \;

If there is exactly ONE lock file, then this is fine. If there are
multiple lock files, this forks off one rm for each file found. If there
are hundreds, well, you get the idea.

The xargs, while less efficient in the singluar case is far more
efficient in the multiple case.

For this instance, the -exec rm will be more efficient, as there is only
one file expected.

-john


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to