why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- From: ewaguespack@xxxxxxxxx
- Date: 17 Jul 2006 08:16:35 -0700
i had a situation that required that i remove several thousand zero
byte files, and i tried this first:
# find . -type f -exec rm -f {} \;
this was taking ages, so on a hunch I decided to try this to see it I
got any better results:
# perl -e 'unlink(glob("*"))'
surprisingly the perl unlink took about a quarter of a second to remove
1000 files versus 30 seconds with find / rm
any idea why?
.
- Follow-Ups:
- Re: why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- From: Sherm Pendley
- Re: why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- From: xhoster
- Re: why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- From: Ben Bacarisse
- Re: why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- From: A. Sinan Unur
- Re: why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- Prev by Date: Re: Perl integrating with PHP
- Next by Date: Re: Problem with ([\w ]+?)
- Previous by thread: When would you use qr// on a literal string?
- Next by thread: Re: why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- Index(es):