Results 1 to 2 of 2
Hi all-
I have several files in directory foo that are created in numerical order...
/foo/bar1.txt
/foo/bar2.txt
...
/foo/bar100.txt
however, ls /foo outputs:
bar100.txt
bar10.txt
bar11.txt
bar12.txt
...
bar19.txt
bar1.txt
...
- 10-25-2006 #1Just Joined!
- Join Date
- Nov 2005
- Location
- USA
- Posts
- 40
ls & sorting filenames
Hi all-
I have several files in directory foo that are created in numerical order...
/foo/bar1.txt
/foo/bar2.txt
...
/foo/bar100.txt
however, ls /foo outputs:
bar100.txt
bar10.txt
bar11.txt
bar12.txt
...
bar19.txt
bar1.txt
bar20.txt
bar21.txt
...
bar2.txt
bar30.txt
...so how do I get ls /foo to show:
bar1.txt
bar2.txt
...
bar10.txt
bar11.txt
...
I've tried various things with sort, but maybe I'm missing something...any ideas would be appreciated!
- 10-25-2006 #2


Reply With Quote