The tag has no wiki summary.

learn more… | top users | synonyms (1)

31
votes
8answers
39k views

Unix/Linux find and sort by date modified

How can I do a simple find which would order the results by most recently modified? Here is the current find I am using (I am doing a shell escape in PHP, so that is the reasoning for the variables): ...
26
votes
7answers
19k views

Unix: ls, how to sort first directories then files etc

I would like to use ls command to first show direcotries and then files. I tried ls -la | sort -k 1 But I got a wrong order.
17
votes
2answers
38k views

How to UNIX sort by one column only?

I know that the -k option for the Unix sort allow us to sort by a specific column and all of the following. For instance, given the input file: 2 3 2 2 1 2 2 1 1 1 Using sort -n -k 1, I get an ...
14
votes
5answers
13k views

In bash, how to sort strings with numbers in them?

If I have these files in a directory cwcch10.pdf cwcch11.pdf cwcch12.pdf cwcch13.pdf cwcch14.pdf cwcch15.pdf cwcch16.pdf cwcch17.pdf cwcch18.pdf cwcch1.pdf cwcch2.pdf cwcch3.pdf cwcch4.pdf cwcch5.pdf ...
11
votes
3answers
1k views

Sorting Excel column by IP address

I have a fairly large (over 200 row) Excel spreadsheet that lists items in my network (i.e. printers, servers, workstations, network projectors, etc), and one of the first columns is the IP Address ...
10
votes
6answers
5k views

Sorting human readable file sizes

How can I sort a list using a human-readable file-size sort, numerical sort that takes size identifier (G,M,K) into account? Can I sort "du -sh" output for example? Problem: Consider the problem of ...
10
votes
1answer
3k views

Equivalent of gnu `sort -R` on OSX?

The GNU sort text utility features a non-standard -R option to randomize input lines (presumably by sorting on a hash). OSX sort does not have this extension. Is there similar functionality ...
10
votes
1answer
12k views

How to sort an Excel spreadsheet columns by row contents?

How do I sort the columns of an Excel spreadsheet? The Sort command from the Data menu only allows me to sort rows by the value of a column. I want to sort the columns alphabetically by the contents ...
8
votes
3answers
8k views

fatsort for Windows 7 [closed]

I've used a program in Linux called fatsort to reorder the directories on my USB flash drive so that my car stereo navigates folders in alphabetical order instead of random order. Is there any ...
7
votes
6answers
926 views

Joining text files with 600M+ lines

I have two files, huge.txt and small.txt. huge.txt has around 600M rows and it's 14 GB. Each line has four space separated words (tokens) and finally another space separated column with a number. ...
7
votes
4answers
2k views

Sorting numerically in a comma-delimited file with Unix

I've got a comma-separated file that looks like this: 100,00869184 6492,8361 1234,31 200,04071 I want to use sort to sort this file numerically by the first column only. Desired Result: ...
7
votes
1answer
1k views

Foobar2000 keeps playing the same set of songs even if the order is random

I use foobar2000 to listen to music but I kept hearing the same set of songs over and over again. My playlist has "Still Alive" and "Pure Pwnage" which it always plays even when there is other music ...
7
votes
1answer
5k views

Windows 7, any way to sort folders and files all mixed together?

Is there a way to sort folders and files by their name all mixed together in Windows 7? It would be easier to understand if you look at THIS page. I want my folders and files arranged like the ...
7
votes
1answer
303 views

Windows 7 Recycle Bin sort by Date Modified

In the Recycle Bin, I sorted by 'Date Modified', but the result is not in the proper order. It was neither ascending nor descending. Other sorts (by Date deleted, size, item type) all work well. Does ...
6
votes
1answer
115 views

List of files under a directory in name order

I wanted a list of files under a directory in name order to pass to an image viewer. I am using find $PHOTODIR -iname "*.jpg". Unfortunately this produces the images out of order. On a USB key ...
6
votes
6answers
7k views

Outlook 2010 Unable to Categorize Messages

I am unable to categorize messages in my inbox. What I'm talking about is the ability to assign a color category. I'm accustomed to being able to just click the icon in the ribbon of the open message ...
6
votes
2answers
407 views

In utf-8 collation, why 11- is less then 1-?

I found that the sort result in ASCII: Source file test: 1- 11- 1-a 11-a Sort using ASCII: $ LANG=en_US.ascii sort test 1- 1-a 11- 11-a And using UTF-8: $ LANG=en_US.utf8 sort test 1- 11- ...
6
votes
1answer
3k views

How can I disable Windows Vista / 7 Explorer's “auto sort” after file copying?

One of the things that really annoys me in Windows Vista / Windows 7 is the new "auto sort" feature. In Windows XP, whenever you copy a bunch of files to a folder, they are all placed at the end of ...
6
votes
1answer
542 views

Mail.app - What sets sort order when adding To addresses by typing Group name?

Using Mail.app in Mac OS X (10.6.3) I'm seeing apparently random sort order when sending a email to a group. Not a major issue but you'd think it be alphabetical?!? To reproduce: Compose New ...
5
votes
2answers
2k views

GNU sort by case-sensitive

The sort utility in Ubuntu 10.04 (Lucid) always sort by case-insensitive, just like if you specify --ignore-case to it. The two sort just give the same result: echo -e "c\nb\nB\na" | sort echo -e ...
5
votes
3answers
2k views

Why does 'sort' ignore special characters, like the asterisk?

I thought that sort would sort common prefixes together but that doesn't always happen. Take this input for example: AT0S*eightieths AT0S*eyetooth's AT*ad AT*Ad AT*AD AT*Eydie AT*eyed ATF*adv ATF*ATV ...
5
votes
4answers
725 views

I need an easy way to 'google' through all my PDF files - anything like this exist? [duplicate]

Here is my scenario and system: System: Win-7, 64-bit. Scenario: Very simply, I have a folder on my dropbox account, titled \Papers. Within this folder, I have a lot of PDF files, and I have even ...
5
votes
1answer
167 views

Sort By # in Windows 8

What is Sort By: # option that is available in Windows 8? A screenshot of it is given below:
5
votes
2answers
643 views

ls version number sorting Mac OS X

Is there an equivalent to ls -v in Mac OS X that will do version number sorting? In Mac OS X, ls -v does NOT do version number sorting, but the Finder seems to.
5
votes
2answers
219 views

How do I expand columns of items in Excel so that each item is on its own line?

I have this: -----A-----|-----B-----|-----C----- 1|cherry |apple |banana 2|kiwi |banana |cantaloupe 3|peach |grape |peach 4| |peach |watermelon 5| ...
5
votes
1answer
111 views

Merge sorted lists

I have a few .txt files (in the same directory) that look like this: 123 carrot 50 apple 13 tomato 5 potato 2 pear and 100 carrot 10 apple 3 tomato 2 potato ...
5
votes
3answers
636 views

How to do custom sorting using unix sort?

I'm using unix sort to sort a comma delimited file with multiple columns. Thus far, this has worked perfectly for sorting the data either numerically or in alphabetical order: Example file before any ...
4
votes
2answers
1k views

unix sort algorithm implementation

What sorting algorithm(s) is/are used in the unix sort command? Insertion/quicksort/etc.?
4
votes
4answers
22k views

Automatically sort music files into folders by album/artist names

I have a large collection of music files (let's say MP3), with metadata (ID3 tags), but all are located in the same folder. I wish to automatically organize all of them according to this metadata. Is ...
4
votes
3answers
15k views

Fixing the first row as sortable title in Excel 2007

I know this is super easy, I just couldn't find it. I'd like the first row in an excel document to be the "title" field. I want that: Whenever I scroll down, this row will remain fixed I can sort ...
4
votes
2answers
179 views

Linux command line / Move files filtered by lexicographic order

I have some files in a directory that are named IMG_0001.jpg ... IMG_9999.jpg. I want to move to another directory the files that lexicographically have a name greater than IMG_9431.jpg How can I do ...
4
votes
3answers
1k views

Windows explorer: sort by date modified

Is it possible to properly view the contents of a folder sorted by modification date in Windows explorer (Windows 7)? I can sort by the date modified column, but folders and files are seperated. I ...
4
votes
3answers
1k views

Firefox does not sort bookmarks automatically

Whenever I add a site to my bookmarks, Firefox puts it at the end of the list. In order to sort my bookmarks by name, I have to right click on the relevant folder and select "Sort by Name". Is there ...
4
votes
1answer
1k views

How can I sort a folder in OS X Lion without having to group files as done with “Arrange By”?

I'm sorry to say there are several things I liked better in Snow Leopard. Sorting files in Finder is one of those things. If I "Arrange By" -> "None" it does not group items and it looks like 10.6. I ...
4
votes
2answers
1k views

How to physically reorder files `03.mp3 01.mp3 02.mp3` (`ls -f`) in a directory?

The physical order of the files matters when I copy them onto my USB stick and listen in car mp3 player. Most of my music album folders are unsorted, e.g. ls -f may produce: 03.song3.mp3 01.song1.mp3 ...
4
votes
1answer
965 views

Get Windows 7 to Stop Grouping Search Results by Immediate Parent Folder

Searching in Windows 7 is frustrating, inconsistent, and too different from in XP. One of the most egregious problems is that it insists on grouping search results by the immediate parent of items. ...
4
votes
2answers
4k views

Sort order “Other Calendars” in Outlook

If I open a Shared Calendar in Outlook, it will be added in the "Other Calendars" section. Unfortunately Outlook doesn't sort them by Name. Is there a way/hack to sort them alphabetically?
4
votes
3answers
2k views

How to sort list-style numbers in Excel?

I have a column of "numbers" in Excel that I would like to sort as follows: 1.1 1.2 1.2.1 1.2.6 1.2.9 1.2.10 1.2.11 1.3 However, regardless if the cell's type is number or text, Excel sorts them as ...
4
votes
2answers
393 views

Custom metadata fields in Windows file manager (or other software)

I'm trying to organize a collection of maybe 500 or so journal articles, stored in a combination of .pdf and .djvu formats. I'd like to be able to sort the collection by author(s), title, journal ...
3
votes
4answers
1k views

How to sort Spotlight results by size in the Finder?

How do I sort search result by size in Finder? I would prefer some sort of setting, or shell plug-in. I'm using this to clean my hard drive by finding and deleting the largest files first. I'm not ...
3
votes
2answers
63 views

Sort files with grep

I have a few hundreds of output files, of which some contain error messages. Lets say I want to automatically put all files containing the string "ERROR_1" in a "subfolder_1", and the rest in a second ...
3
votes
1answer
384 views

sort by word length in Nth column

I've got a column file like this: 1 1 1 AKSDFJADFKASDJFAK 2 1 1 ADKLCJASDLKCJDLACKADCJLKDACJADS 3 1 2 AKLJDFHALKDJFHLKJSDKSDFHAKJFDHAKFHJAKFJ And I would like to sort the entries by the fourth ...
3
votes
2answers
644 views

Increasing productivity with huge Outlook Inbox - “Sorted Inbox” and frequencies

I am using Exchange Online and Outlook 2010 with a very high email volume and a big Inbox. I am already using colored categories and filtering of distribution lists into special folders. I am also ...
3
votes
2answers
329 views

How to reorder folders? (as displayed in `ls -U`)

I've got a number of unordered folders on a memory stick, which my car stereo shows in order of their real position on the stick (i.e. same as ls -U) What's the easiest way of physically reordering ...
3
votes
2answers
638 views

How do I randomly sort groups of multiple lines in a multi-GB file?

I've got a multi-GB file that has elements in 4 lines, and I would like to have every 4 lines randomized in another file, this is, keeping each four lines grouped and randomize those sets. Is there an ...
3
votes
2answers
7k views

How do I change the default sort order on Windows Explorer and the File Dialogs

My file dialog shows files sorted by date and I want it to sort alphabetically by filename.
3
votes
2answers
177 views

how can I sort duplicate values in excel without repeated it sequence

i want the excel sort the values A to Z first then take the duplicate values to sort it again below A to Z like the following: if i have the values a,c,b,e,d,a,c when i sort it a to z it's look like ...
3
votes
1answer
379 views

Sorting files based on a timestamp within the file

I have a bunch of files which contain an ascii header with a time stamp WITHIN the file, followed by a large chunck of binary data. I would like to list the files sorted by this time stamp, at the ...
3
votes
1answer
74 views

Bug in sort or misunderstanding

Suppose I have this file b 10 foo a 10 bar a 2 bar I want to sort by the third colum, alphabetically. In case of ties, I want to sort by the second column, numerically. In the man page for the unix ...
3
votes
2answers
447 views

Unix sort keys cause performance problems

My data: It's a 71 MB file with 1.5 million rows. It has 6 fields All six fields combine to form a unique key - so that's what I need to sort on. Sort statement: sort -t ',' -k1,1 -k2,2 -k3,3 ...