Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: arg list too long in unix

RE: arg list too long in unix

From: Steven Lembark <lembark_at_wrkhors.com>
Date: Fri, 30 Aug 2002 06:43:30 -0800
Message-ID: <F001.004C4044.20020830064330@fatcity.com>

> Hi all,
>
> Is there something like,
>
> unix is unable to use commands like ls -ltr (sort etc)
> when there are huge number of files in a directory(may
> be thousands/millions).
>
> If yes, what is the limit and how to know it on sun
> solaris 2.8.

This is not an issue with the command, but the buffer used by the O/S to store the comman line arguments. Standard sizes are 4KB or 8KB (i.e., on page). If the command line arg's exceed this size then the command cannot be started.

Classic case is a directory with too many files in it; "ls" may work fine but "ls *" will blow up because the shell's expanding "*" overflows the buffer.

If the file names are 500 char's long then you may have problems with only 10 files in the directory [don't laugh, I've seen it].

ls is partcularly bad about dealing with over-populated dir's becuse it sorts the result, which can be expensive in a 10 000 file diredtory; find does not sort anything and is better suited to dealing with huge file lists.

--
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).
Received on Fri Aug 30 2002 - 09:43:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US