Quite true, but ironically enough, the xargs manpage (on my system as well
as many others) only has examples using ls to feed xargs. I meant to end
the exec param with \+ instead of \; which aggregates a set to operate on.
I'm not clear on whether that means one giant set, or several smaller
sets, so I suppose it could have the same 'arg list too long' error as ls.
I've never had to worry about this issue since I've never had 70,000 files
in one directory before!
-- Philip
----- Original Message -----
To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
Sent: Thursday, August 29, 2002 12:23 PM
-- Philip Douglass <[EMAIL PROTECTED]>
> I'm not sure xargs will work -- it seems to me that since xargs is
> typically invoked as: 'ls cz* | xargs rm', Nuno is likely to get the
same
> arg list too long error. I think the best way to delete the files would
> be: 'find . -name cz\* -exec rm -f {} \;'
Anyone who invokes xargs from "ls *" needs to learn how to use
xargs: feed it with things that ae not affected by the arg
list. For example:
find . -type f -name 'cz*' | xargs rm -f;
is one nice way: the '*' is not expanded on the command line
but used with an internal glob call in find.
Other problem with using ls for large file op's is that it
attempts to sort the output, which is expensive and a memory
hog. Find simply spits out matching files as they are found.
--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647
+1 800 762 1582
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Steven Lembark
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Philip Douglass
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).