NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
xargs is your friend (Score:2, Informative)
(darren)
Re:xargs is your friend (Score:2)
Re:xargs is your friend (Score:2, Informative)
Reply to This
Parent
Re:xargs is your friend (Score:3, Interesting)
Re:xargs is your friend (Score:2)
because your shell still has
to do the globbing for the latter...
and you may lose
Were that I say, pancakes?
Re:xargs is your friend (Score:2)
Re:xargs is your friend (Score:2)
ls shouldn't be slow though. Stoopid MacBSD?
Of course it depends on the filesystem,
it's not advisable for many to have single
directories with so many files. It might have
been quicker to remove the directory and
recreate it afterwards
Were that I say, pancakes?
Re:xargs is your friend (Score:3, Informative)
Re:xargs is your friend (Score:1)
ls sorts the entries in the directory, while echo does not, which means ls will always be slower for large directories.
echo * | xargs rmis simply the shell's glob operator, which is most likely implemented using readdir.(darren)
Re:xargs is your friend (Score:2)
My understanding is that only works for GNU xargs, though.
Of course, who would want to use a proprietary xargs?
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers