Re: why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- From: ewaguespack@xxxxxxxxx
- Date: 17 Jul 2006 13:29:48 -0700
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
.
- References:
- why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- From: ewaguespack
- Re: why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- From: Sherm Pendley
- why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- Prev by Date: Re: Interfacing with Matlab using Win32::OLE
- Next by Date: Re: Net::Telnet - Library Application
- Previous by thread: Re: why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- Next by thread: skip path prune
- Index(es):