Results 1 to 4 of 4
When sorting files it seems that Linux (or at least the ls command), unlike Windows, ignores the underescore character. For example. ls diplayes "a" then "_b" then "c", while Windows ...
- 02-21-2007 #1Just Joined!
- Join Date
- Feb 2007
- Posts
- 3
sorting and the underscore character
When sorting files it seems that Linux (or at least the ls command), unlike Windows, ignores the underescore character. For example. ls diplayes "a" then "_b" then "c", while Windows first displays "_b" then "a" then "c". Can somebody tell me why is that and how could I obtain the other behaviour?
Thanks.
- 02-21-2007 #2
Use the option
with ls.--sort=none
For ex:will do.ls -l --sort=none---------------------------------
Registered Linux User #440311
HI2ARUN _AT_ GMAIL _DOT_ COM
---------------------------------
- 02-21-2007 #3Just Joined!
- Join Date
- Feb 2007
- Posts
- 3
Yes... but I want them sorted in lexicographic order (_<a<b<...). I don't understand why 'ls' ignores the underscore.
- 02-22-2007 #4
piping the output of 'ls' to 'sort' will do... but not in lexical order as u want...
---------------------------------
Registered Linux User #440311
HI2ARUN _AT_ GMAIL _DOT_ COM
---------------------------------


Reply With Quote