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.

learn more… | top users | synonyms

13
votes
2answers
683 views

Wrong behavior of sort command?

I tried to sort the content of a file in Ubuntu desktop 14.04 (Trusty Tahr). In my case, the expected result should be same as original content, but the actual result is not. Why? # cat test.txt ...
9
votes
8answers
4k views

How do I sort by human readable sizes numerically?

for example I have command that shows how much space folder takes du folder | sort -n it works great, however I would like to have human readable form du -h folder however if I do that than I ...
7
votes
4answers
2k views

Nautilus sorts the Name-column “mysteriously”. How can I change the collating sequence?

What I describe here is not about a problem with my Nautilus. (it is the default behavour) I understand why Nautilus sorts the Name-column (ascending) so that "6 cats" occuring before "10 dogs"... ...
6
votes
3answers
5k views

Can I view my files sorted by date?

Can I view my files sorted by date? I want to see my files sorted by date, I mean the first one the newest. I didn't find this option. Thanks in advance.
6
votes
1answer
836 views

How can I make a script to place files older than each day before into their own folder?

I'm running an unnecessarily complex script which looks similar to this command: find /home/user/videos/*.avi -mtime +0 -exec mv -f {} "/home/nb/videos/1 day old" \; And then I run the same ...
5
votes
3answers
6k views

How do I sort account names alphabetically in Thunderbird?

I just upgraded to Ubuntu 12.04 and Thunderbird 13.0.1. I had 2 accounts earlier in Thunderbird: a..@i..net s..@c..com I also had another account on SeaMonkey: a..@i..com which I imported into ...
5
votes
1answer
1k views

How do I force folder view sort order to not ignore special characters?

I have many folders in my home directory that have names that begin with special characters such as _OLD_500GB_HD or !FolderIWantToSeeAtTheTop, but for some reason these folders are sorted according ...
5
votes
2answers
668 views

Sort albums by date in Banshee

Banshee has an option - sort albums by release date, not by name, but turning it on do nothing. All tags are filled correctly. Is at a bug or I miss something?
5
votes
3answers
684 views

Music player that can sort or filter by number of tracks (per artist)

I'm looking for a music player/music library manager that allows me to see a list of artists sorted by the number of tracks I have for that artist. Winamp does this, but I haven't found any ...
4
votes
5answers
8k views

Identify duplicate lines in a file without deleting them?

I have my references as a text file with a long list of entries and each has two (or more) fields. The first column is the reference's url; the second column is the title which may vary a bit ...
4
votes
2answers
633 views

Searching through ODT documents without opening them?

Let's say I have 2000 .ODT files. Their names are random numbers. How do I go about searching for, let's say, "pricing list"? How do I find the document I need without opening all of them one by one ...
4
votes
1answer
115 views

Sort millions of text files in a folder using unix sort

I am trying to sort a lot of files (millions ie approx 2.5m) .txt files in a folder called NZParsed. All the files in the folder are named like 1.txt 2.txt and so on till 25xxxxx.txt After running ...
4
votes
1answer
138 views

How can I make Nautilus sorting ignore the word “The” or “A” at the beginning of file and folder names?

I have a rather large library of media and it gets annoying looking for something when I forget that the "official" name of the movie, artist, song, etc begins with the words "The" or "A". So, for ...
3
votes
1answer
300 views

Can I sort files in Dolphin into date order on Kubuntu 12.04.01?

Can I sort files in Dolphin into date order on Kubuntu 12.04.01? It was suggested (can't remember where) that Nepomuk would do this. If this is so, how do I enable Nepomuk. The application appears to ...
3
votes
2answers
423 views

How to make some folders appear on the top in Nautilus?

I'd like to have some folders on top e.g. on Windows I had _videos folder which would always appear on top. How do I achieve the same effect in case of Nautilus? It's rarely the case I'd need similar ...
3
votes
0answers
155 views

How to make a new-defined alphabetic sort order in a locale work?

I'm working on a new Latin-based script for Persian. So I've used such lines in GB locale file, to modify the sort order: First of all, I've introduced the new characters in such way: ...
2
votes
2answers
8k views

How to sort lines in a text file from the terminal?

I have to sort the GPA in a file for my class lab. The teacher uses putty, for those of us that chose to use Ubuntu in the class, we have no idea how to do the command for ascending sort and ...
2
votes
3answers
271 views

create a .tar file of all latest files in the directories

I am in a directory A. This has a lot of sub directories B, C, D. Each sub directories will have a list of files. I need to create a .tar file of all the latest file in each subdirectory. Example: ...
2
votes
1answer
238 views

How to put Banshee in manual sort mode

i'm making a playlist for my friend's birthday.I need to sort the songs.
2
votes
2answers
493 views

Change the Sort order of Devices in Nautilus

I have Three Windows drive, my nautilus shows devices in following order I want it to be sorted like windows 7 does C drive D drive E Drive My Massport 13 GB FS Future attached removable ...
2
votes
0answers
197 views

Move downloaded files based on criteria

After downloading tv shows and movies I would like them to be automatically moved to two separate folders (named "tv shows" and "Movies"). I know there are a lot of programs that you can do this with ...
2
votes
0answers
328 views

How do I disable file sorting on usb drives? [closed]

Are there any file managers that allow unsorted folders on usb drives? I can select manual sort on my hard drives fine, but when I connect a usb mass storage device the option for manual sort is gone ...
2
votes
0answers
190 views

Can I/How do I sort titles by resolution in VLC, mplayer, or similar app? [closed]

Can I/How do I sort titles by resolution in VLC, mplayer, or similar app, i.e., sort videos by their pixel count?, e.g., a 1920x1080 vid followed by a 1280x720 vid, etc, ascending or descending.
1
vote
2answers
834 views

How to automatically sort files out?

I have many files in my external harddrive, so I want to automatically tell the computer to sort all my files into folders, by their size, extension, name and other variables. Is there any program ...
1
vote
1answer
172 views

Using 'grep' and other utilities

I know this is a seemingly peculiar question, but I want to have a better understanding of using Linux utilities so I'm going to ask for something that seems rather complicated to me to understand the ...
1
vote
1answer
50 views

How to sort numbers in text files? [closed]

I made a file using ed and named it numeric. Its content is as follow: -100 -10 0 99 11 -56 12 Then I executed this command on terminal: sort numeric And the result was: 0 -10 -100 11 12 -56 99 ...
1
vote
1answer
96 views

help understand diff between: sort < file.txt VS file.txt | sort

so im learning Ubuntu (for the first time) and am reading trough Ubuntu server book chapter 14 says filename.txt | sort will give me an output with the content of the file, but sorted HOWEVER it ...
1
vote
2answers
584 views

Problem IN piping the output of one command to other

I want to recursively sort all the file in the present directly. I tried ls -lh -R |sort >> output.txt. But i think multi-threading problem is creating a problem, before complete output of ls ...
1
vote
2answers
537 views

Sort lines in text file with specific separator in Linux

I need to sort the lines of a text file (without any extension) where the lines are separated by %. When using sort command, those %s are also getting sorted out which I do not want. How to sort the ...
1
vote
2answers
69 views

sorting a file using the sort command and overwrite it

i was trying to sort a text file and replace the sorted file with the original one, so i set the file to be also the output of the sort command too, but when i do that it clears the file contents and ...
1
vote
1answer
100 views

Sorting a file alphabetically by last name only

I'm interested in sorting a text file that has entries with the First name and Last name in that order [Ex] John Doe I'm interested in sorting the list by LAST name only. Is this a job for sed or ...
1
vote
3answers
368 views

Wiping my hard disks, how do I pull out and sort all the music/videos/pictures?

Looking to raid my hard disks but need all the important stuff out first, have not been very tidy with my file management, is there a program that will scan my computer and pull out all the video, ...
1
vote
1answer
29 views

directory sorting text

I am running Ubuntu 12 and a while back I wrote a small script file to manipulate a text file which I use for a workshop index. The most important function is to sort the file into alphabetical order ...
1
vote
1answer
38 views

Efficiently finding the first file (in the lexicographical sense) among multiple directories

I have hundreds of folders and each folder contains thousands of files. I want to identify the "first" file among all files of all folders, "first" being defined by the lexicographical order of the ...
1
vote
0answers
37 views

After renaming a file the Ubuntu 14.04 program “Files” sorts alphanumerically and displays location of new/corrected file name. Can that be disabled?

I looked in Ubuntu 14.04 and I could not find a option to disable a awkward feature that made extra work for me. After renaming a file then the program "Files, version 3.10.1" reorganizes ...
1
vote
2answers
397 views

How to take the first n files from a directory with a letter in alphabetical order to another directory

I need to take the first 3 files from a directory starting with letter b in alphabetical order to another directory. I've come up with this command: find ...
1
vote
1answer
479 views

is there a file manager which you can sort files manually with, as in Windows? or, Can I manually sort my files from the terminal?

In Nautilus you can sort files manually only in the icon view (and the arrangement is a mess). My question is: is there a file manager which you can sort files manually with, as in Windows? i.e., ...
1
vote
1answer
2k views

LibreOffice latest version color sort

I would like to arrange my cells according to color. I have a mix data cell with different colors in between, and would like to arrange them so all the same colors are with each other... Is it ...
1
vote
0answers
243 views

Why does sort perform much faster on my Slackware server? [closed]

I have a powerful machine with 32GB RAM, 10TB hard disk storage, and an Intel Core i7 3.3Ghz processor. We installed Ubuntu Server 11.10 and tried some scripts: the most impressive was a sort file.txt ...
0
votes
3answers
107 views

Help with a Bash script or some program to sort files and move to different folders

is there anyone out there who can help me sort some files with a bash script or terminal commands (or even a little Java program) that can be used to sort and and move files to new folders? I have ...
0
votes
2answers
338 views

How to sort the files in download folder of Ubuntu by date of download?

how can I sort the files in my download folder in the order of the date of download? My OS is Ubuntu 14.10 & I am using Nautilus - Files 3.10.1
0
votes
2answers
193 views

Sorting two columns with sort and uniq

I have a file that needs sorting in a specific way but I can't figure out how to do it. I've tried the following command but it doesn't give me what I want: sort -t" " -k1,1 Original_File | uniq ...
0
votes
3answers
684 views

Filter .txt file on descending order of created date

I had created a .txt file but now I forgot where I save it and also the file name of it. So my question is: is there any method to filter out .txt files on descending order of created date? I'm ...
0
votes
1answer
964 views

How to sort files by file extensions through the command line?

This is my question: How to sort files by file extensions through the command line?
0
votes
1answer
525 views

How to change the sort order of a specific folder in Nautilus

I want all the files in my Downloads folder to be sorted by modification date, but all other folders, and files in other partitions to be sorted by name. How can I do that? Edit: I want Nautilus to ...
0
votes
1answer
23 views

How can I sort Chinese characters from paragraph form to get characters on individual lines?

I would like to sort Chinese characters from a paragraph form (to a list with "paragraph returns" after each character). I am using LibreOffice Calc (can also use Writer), on my Xubuntu 14.04 distro. ...
0
votes
1answer
234 views

Sorting Pictures by name-column “record date” with nautilus

i use Ubuntu 12.04 LTS a few days now and i like to shot photos :-). So far, i load all my pictures on my ubuntu system (approximatly 15000). But when i want to sort them in their folders by the ...
0
votes
2answers
447 views

How do I force a folder sort for my downloaded music on Rhythmbox

When I import music from an external source, it sorts it into the nice and organized folders by artist - album, but when I import music from Downloads, it just references the file in Downloads and ...