Skip to main content

Questions tagged [sort]

Sort is a command-line program that allows standard input or specified text files to be sorted in various ways such as numerically or alphabetically, and then the result can be displayed in the terminal or sent to file.

3 votes
0 answers
36 views

I'm using Ubuntu 25.10. How do you make ls sort order case insensitive? For example, when I do "ls -l", I get this: $ ls -l total 24 drwxrwxr-x 2 menmonic mnemonic 4096 Oct 19 09:13 Apples ...
Scott Deagan's user avatar
19 votes
1 answer
3k views

When I type the following in a command line: sort à b C d _e followed by Ctrl-D I get this result: C _e b d à When I type locale in the same command line I see that LC_COLLATE is fr_FR.UTF-8. sort ...
Stéphane Tréboux's user avatar
1 vote
0 answers
99 views

Ubuntu 24.04. Files sorting by name shows 2025-09-16.pdf 202409.pdf 202410.pdf In terminal, ls -l shows 202409.pdf 202410.pdf 2025-09-16.pdf How can I change so Files sorts the same way as ls -l?
Guangliang's user avatar
1 vote
0 answers
62 views

I use Double Commander as my file manager for my desktop. It sorts my audio equipment files like this: AU-217.jpg AU-2900.jpg AU-666.jpg This is also what I get when I do ls -l in a terminal window. ...
Tjerk Schuringa's user avatar
1 vote
1 answer
1k views

I'm using Ubuntu 24.04 and when I press on the 'show apps' button the display shows me a alphabetically unsorted list of applications. Is there a way to sort this list? I've tried the command: ...
GiuseppeS's user avatar
-1 votes
1 answer
693 views

I only managed to list the directories themselves with ls -a or the files sorted by directory with ls -aR
Nuno Fonseca's user avatar
0 votes
3 answers
290 views

I have a file that contains: 192.168.130.175 2014-09-04 10:25:01 /index.html 192.168.138.244 2014-09-04 11:23:00 /index.html 192.168.138.244 2014-09-04 10:29:37 /...
龚健翔's user avatar
0 votes
3 answers
168 views

I need to know how to find one or more files with the same filename (except what's inside parenthesis) and delete the one(s) with the smaller size, in a folder. I don't care if it's a GUI app or ...
Nuno Fonseca's user avatar
1 vote
1 answer
143 views

I have a text file containing paths of various wav files. But when they are created they are sorted based on alphabetical order. Hence the paths are like this /home/wav_path/...
Turing101's user avatar
  • 141
3 votes
1 answer
635 views

I have a file containing lines, some of which start with a ! character, some with a ? character, and some with a space ( ) character. The second character is always a letter of the alphabet. When I ...
Tasos Papastylianou's user avatar
0 votes
1 answer
514 views

We have a docker image which runs Newman queries against a backend to verify things are as expected. Now we have a new need to test that a response containing Danish characters is sorted correctly in ...
Thorbjørn Ravn Andersen's user avatar
0 votes
1 answer
919 views

I need to see how many times users logged in. I used last | sort | uniq -c but it gave me bad data I need to sort them by number of times they logged in and only show username and number of time. for ...
Usermaxn's user avatar
  • 247
0 votes
0 answers
429 views

I use tail in a variable to echo contents of multiple files in a folder. VAR="$(tail -n +1 DIR/*/file)" This outputs all the files contents with the needed filename on top like ==> /...
diggidre's user avatar
  • 111
6 votes
1 answer
1k views

I want to sort dates in the format 31.12.2023. Lowest year should be displayed first then lowest month then lowest day. Is the following code fitting my needs? Seems good on first look. sort -t '.' -k ...
diggidre's user avatar
  • 111
1 vote
0 answers
222 views

So I'm trying to get so special characters are on top followed by numbers, then letters case insensitive. I've added export LC_ALL=C to my .profile, but the result is case sensitive. Is there a better ...
user2533098's user avatar

15 30 50 per page
1
2 3 4 5
9