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.
|