Jeff Haferman wrote:
A user has 5 directories, each has tens of thousands of files, the
largest directory has over a million files.  The files themselves are
not very large, here is an "ls -lh" on the directories:
[these are all ZFS-based]

[r...@cluster]# ls -lh
total 341M
drwxr-xr-x+ 2 someone cluster  13K Sep 14 19:09 0/
drwxr-xr-x+ 2 someone cluster  50K Sep 14 19:09 1/
drwxr-xr-x+ 2 someone cluster 197K Sep 14 19:09 2/
drwxr-xr-x+ 2 someone cluster 785K Sep 14 19:09 3/
drwxr-xr-x+ 2 someone cluster 3.1M Sep 14 19:09 4/

When I go into directory "0", it takes about a minute for an "ls -1 |
grep wc" to return (it has about 12,000 files).  Directory "1" takes
between 5-10 minutes for the same command to return (it has about 50,000
files).

"ls" sorts its output before printing, unless you use the option to turn this off (-f, IIRC, but check the man-page).

"echo * | wc" is also a way to find out what's in a directory, but you'll miss "."files, and the shell you're using may have an influence ..

HTH
Michael
--
Michael Schuster     http://blogs.sun.com/recursion
Recursion, n.: see 'Recursion'
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to