Big problem with huge number of files

Andreas Dilger adilger at
Tue Jan 6 09:35:40 UTC 2009

On Jan 02, 2009  22:38 +0100, Jure Pečar wrote:
> On Fri, 02 Jan 2009 22:18:55 +0200
> Sergey Shyman <sergey.shyman at> wrote:
> > I have an issue when I can't get directory listing for maildir with huge 
> > number of files inside. Neither ls, du or any other command finished 
> > successfully, it just running for hours without any success. Does 
> > anybody know how I could get directory listing and copies of my files? 
> > Any pointing would be great and greatly appreciated. Thanks in advance!
> Have you tried ls -U so that ls doesn't do internal sorting?
> Have you tried find?

GNU ls is useless in this regard, because even the "-U" option will wait
until it has read all of the files before it starts printing anything.
It must wait until all the data is available before deciding whether to
sort or not.

Using "find" will probably work very quickly.

Cheers, Andreas
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

More information about the Ext3-users mailing list