xfs
[Top] [All Lists]

Re: Max file number in single directory

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: Max file number in single directory
From: Ragnar Kjørstad <xfs@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 2 Sep 2002 02:29:02 +0200
Cc: root@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxx
In-reply-to: <20020901235658.A13582@infradead.org>; from hch@infradead.org on Sun, Sep 01, 2002 at 11:56:58PM +0100
References: <20020901223911.13399.qmail@larry.minfin.government.bg> <20020901235658.A13582@infradead.org>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.2.5.1i
On Sun, Sep 01, 2002 at 11:56:58PM +0100, Christoph Hellwig wrote:
> 
> On Sun, Sep 01, 2002 at 10:39:11PM -0000, 
> root@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:
> > I got this error when I try to proceed my directory
> > 
> > root@larry:~/phones/new_scripts# ls CHEPELARE/*.htm
> > bash: /bin/ls: Argument list too long
> > 
> > Also I'd like to know, if this is general Linux VFS, XFS or file-utils 
> > implementation restriction/bug or whatever
> 
> It's a general Linux limitation - but nothing related to the number of files
> in a directory.  By doing a ls CHEPELARE/*.htm you let the shell glob the
> filenames and pass all matching ones to /bin/ls.  With 30303 html files in
> directory these are quite a lot and the resulting array overflows the 
> hardcoded
> change for the argument size in the kernel binary loader.

The problem can be avoided by not using shell-globbing, and rather do 
something like:
find CHEPELARE -name '*.htm' -ls


-- 
Ragnar Kjørstad


<Prev in Thread] Current Thread [Next in Thread>