Subscribe
$ ls . | head
001_Michael_Mills_02_Adam_Ant_and_Bow_Wow_Wow.mp3
006.jpg
016.jpg
01_godspeed_you_black_emperor_storm.mp3
02 Track 2.wma
032.jpg
034.jpg
046.jpg
04_dead_eyes.mp3
059.jpg
$ find . | head
.
./.bashrc
./.bash_profile
./.fluxbox
./.fluxbox/keys
./.fluxbox/menu
./.fluxbox/init
./.fluxbox/apps
./.fluxbox/styles
./.fluxbox/styles/Cthulhain
ls -U would work as well as find? (I don't have a large directory to test this on.) The -U is "unsorted, directory order". <code> tags don't double space things.
$ mkdir blah
$ cd blah
$ i=0; while true; do touch $i;i=$(( i + 1 )); done
( wait a while and Ctrl-c)
$ ls | sort -n | tail -1
53296
(number of files in this directory)
$ time ls -Ui > /tmp/junk
real 0m0.364s
$ time find . > /tmp/junk
real 0m0.399s
$ time ls > /tmp/junk
real 0m0.834s
$ time find . -ls > /tmp/junk
real 0m2.143s
$ time for i in *; do ls $i; done > /tmp/junk
real 4m24.637s
$ time echo * > /tmp/junk
real 0m1.375s
You are not logged in, either login or create an account to post comments
find /var/lib/php5
not give you a listing? If so, what's the error you get?
posted by eschatfische at 6:21 PM on October 17, 2007