Re: why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- From: xhoster@xxxxxxxxx
- Date: 17 Jul 2006 16:07:24 GMT
Ben Bacarisse <spam@xxxxxxxxx> wrote:
ewaguespack@xxxxxxxxx wrote:
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("*"))'
I smell a rat. What an odd command to post! For one thing, it does
not do the same as the find above and, secondly, a single rm would
surely be faster still?
With luck, no one will have tried either command out!
I tried out both commands. In a test directory made for just such a
purpose, of course. Sheesh. You'd think the part about "remove several
thousand...files" as well as the "rm" and "unlink" showing up in all their
undisguised glory would be a pretty good tip off that one should not try
then in root and as root.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
.
- 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: Ben Bacarisse
- why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- Prev by Date: Re: why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- Next by Date: Re: why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- Previous by thread: Re: why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- Next by thread: Re: why is perl -e 'unlink(glob("*"))' so much faster than rm ?
- Index(es):
Relevant Pages
|
|