Friday, April 26, 2024
Homepage · ls
 Popular · Latest · Hot · Upcoming
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 3385  / 3 Years ago, sat, august 14, 2021, 11:31:19

I have a couple files and ls sorts them like this:



a
_b
c


but I want to have



_b
a
c


How can I do that?


More From » ls

 Answers
6

As a one-off command you can do this:



LC_COLLATE=C ls



Or you can add export LC_COLLATE="C" to your .bashrc to make it permanent (may have unexpected results sorting elsewhere).



More information on Ubuntu forums.


[#44738] Sunday, August 15, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
otatorm

Total Points: 218
Total Questions: 113
Total Answers: 124

Location: British Indian Ocean Territory
Member since Tue, Feb 22, 2022
2 Years ago
;