Re: why is perl -e 'unlink(glob("*"))' so much faster than rm ?




The find was spawning a new instance of 'rm' for each file - very inefficient.

The equivalent to your Perl code would be to use find to get a list of files,
and then use 'xargs' to pass that whole list to one instance of 'rm':

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

sherm--



thanks for the info everyone.

-op

.