| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: arg list too long in unix
>
> If the arg list is too long, one way to shorten it is with 'head'.
>
> find /dir_2_clean -name "cz*" -print | head -1000 | xargs rm -f
The whole point of xargs is that it doesn't get overlong arguments -- unless one of the file paths is > 4KB by itself. This leaves the "head" extraneous:
cd $someplace;
find . -type f -name 'cz*' | xargs rm -f;
will happily do the deed.
Advantage to cd is that a naked '.' won't blow off the entire system via something like '/ dir_2_clean'.
--
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:
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).
Received on Thu Aug 29 2002 - 18:47:11 CDT
![]() |
![]() |