When I try it on this directory tree (just some files from recent
projects to make a small tree to work with):
abc@zaphod$ find . -print
.
./find_big_files.pl.13MY08
./baz
./baz/shirt_back_no_aflac.gif
./baz/NOTES
./baz/shirt_front.gif
./bar
./bar/find_big_files.pl.13MY08
./bar/find_big_files.pl
./bar/find_big_files.pl~
./bar/find_big_files.pl.dead_end
./find_big_files.pl
./find_big_files.pl~
./find_big_files.pl.dead_end
abc@zaphod$
This:
abc@zaphod$ ls -sSR --hide=d | sort -g -k 1
.:
./bar:
./baz:
total 16
total 24
total 36
4 bar
4 baz
4 find_big_files.pl
4 find_big_files.pl
4 find_big_files.pl~
4 find_big_files.pl~
4 find_big_files.pl.13MY08
4 find_big_files.pl.13MY08
4 find_big_files.pl.dead_end
4 find_big_files.pl.dead_end
4 NOTES
16 shirt_back_no_aflac.gif
16 shirt_front.gif
abc@zaphod$
It's also *very* slow, on a bigger directory tree, I've had it running
for about 15 min. now, and nothing has been printed.
After my Dr. appointment today, I'll maybe look into the man pages for
ls and sort and see if I can figure something out. I already went down
that route before the perl script, and got nowhere useful, but as I
said, I'm pretty sure a one line solution exists.
BTW, here's what the perl script puts out:
abc@zaphod$ find_big_files
-rw-r--r-- 1 abc abc 14995 2008-05-13 07:48 ./baz/shirt_front.gif
-rw-r--r-- 1 abc abc 12465 2008-05-13 07:48
./baz/shirt_back_no_aflac.gif
drwxr-xr-x 4 abc abc 4096 2008-05-13 07:47 .
drwxr-xr-x 2 abc abc 4096 2008-05-13 07:48 ./baz
drwxr-xr-x 2 abc abc 4096 2008-05-13 07:46 ./bar
-rwxr-xr-x 1 abc abc 920 2008-05-13 07:46 ./bar/find_big_files.pl
-rwxr-xr-x 1 abc abc 920 2008-05-13 07:46 ./find_big_files.pl
-rwxr-xr-x 1 abc abc 804 2008-05-13 07:46
./bar/find_big_files.pl.dead_end
-rwxr-xr-x 1 abc abc 804 2008-05-13 07:46 ./find_big_files.pl.dead_end
-rwxr-xr-x 1 abc abc 695 2008-05-13 07:46 ./find_big_files.pl.13MY08
-rwxr-xr-x 1 abc abc 695 2008-05-13 07:46
./bar/find_big_files.pl.13MY08
-rwxr-xr-x 1 abc abc 695 2008-05-13 07:46 ./bar/find_big_files.pl~
-rwxr-xr-x 1 abc abc 695 2008-05-13 07:46 ./find_big_files.pl~
-rw-r--r-- 1 abc abc 34 2008-05-13 07:48 ./baz/NOTES
abc@zaphod$