xfs
[Top] [All Lists]

Re: Max file number in single directory

To: root@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Max file number in single directory
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Sun, 1 Sep 2002 23:56:58 +0100
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20020901223911.13399.qmail@xxxxxxxxxxxxxxxxxxxxxxxxxx>; from root@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx on Sun, Sep 01, 2002 at 10:39:11PM -0000
References: <20020901223911.13399.qmail@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.2.5.1i
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
> 
> cat CHEPELARE/* returns same error as above
> 
> while
> root@larry:~/phones/new_scripts# ls CHEPELARE/
> works fine
> 
> the number of files in that dir is fairy big
> 
> root@larry:~/phones/new_scripts# ls CHEPELARE/ |wc -l
>   30303
> 
> 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.


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