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 ...
0
votes
2answers
147 views

How do I sort command-line output?

I'm trying to use du to sort the output by filesize, but it doesn't looks like there's an option for that. Can I pipe it into another command to handle the sorting?
1
vote
1answer
201 views

Command-line sort and copy text files to one single file renders an error

I stumbled on question 217394 which explains how to copy files sorted alphabetically into one single file. Trying to implement the command myself rendered the following error message: The system ...
0
votes
4answers
890 views

Reverse order using command

Is there a way i use the ps --sort option on a linux to display the processes in reverse order based on the process ID or is there another command i can use for this?
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 ...
1
vote
1answer
342 views

order for loop output command prompt

I'm using the following command to list some of my favorite videos in a directory (and redirect the output into a text file): for %i in (*avi *.mkv *mp4) do @echo %~ni I'd like to alphabetically ...
1
vote
1answer
237 views

How do I re-sort a list of files grouped by directory?

From within a DOS batch file, how can I crudely re-sort a text file containing a manually maintained list of source files, so those files listed (from the same directory) in the small example extract ...
1
vote
1answer
1k views

specify the sort order in “copy /b *.dat foo” in Windows cmd

Normally, when I do a copy /b *.data foo in Windows cmd, the *.data files are catenated in the sorted order into the destination file foo. This matches my desired behavior. However, I just met a ...
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. ...
1
vote
2answers
63 views

When your field-terminating char appears within field values

I've had a very colorful morning learning the innerparts of Linux's sort command, and have come across yet another issue that I can't seem to find an answer for in the documentation. I'm currently ...
1
vote
1answer
179 views

SORT empties my file?

I'm attempting to sort a csv on my machine, but I seem to be erasing the contents each time I use the sort command. I've basically created a copy of my csv lacking the first row: sed '1d' ...