Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: arg list too long in unix
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!
> 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: lembark_at_wrkhors.com 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: ListGuru_at_fatcity.com (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: philipd_at_sirs.com 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: ListGuru_at_fatcity.com (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).Received on Thu Aug 29 2002 - 15:03:30 CDT
![]() |
![]() |