Questions tagged [sort]
The sort tag has no usage guidance.
28
questions
1
vote
0
answers
40
views
Sort two config files in the same order
I have two servers running the same set of internally developed apps. One is the "production" server, the other is the "dev/test" server. As time has gone on, the config files ...
0
votes
0
answers
57
views
atop: how to sort arbitrary column like STTIME and STDATE?
Command atop -v shows start date (STDATE) and star time (STTIME) columns.
How to sort them? atop man list sorting possibilities only for:
-C 'CPU consumption (default)
-M 'memory consumption
-D '...
4
votes
1
answer
5k
views
How to output all files/folders ordered by size, including hidden ones
How can I output all files/directories, ordered by size, including
hidden ones
(those whose name starts with a dot), all in one go?
1
The difference to How can I sort du -h output by size is
that I'm ...
-1
votes
1
answer
205
views
PowerShell: How to get a list of the top biggest files (of a certain type)?
Getting the biggest file list might look like
gci -r|sort -descending -property length | select -first 10 name, length
How can I add a specific filetype selection , like ascii or formated log/json/...
3
votes
1
answer
4k
views
jq sort by date (iso 8601)
I try to sort json by date (field CreationTimeUTC) in iso 8601 format with jq 1.5.
I found this post, but that return : 'Cannot index boolean with string "CreationTimeUTC"'
jq '.Entities....
4
votes
0
answers
2k
views
Fastest way to sort very large files preferably with progress
I have a 200GB flat file (one word per line) and I want to sort the file, then remove the duplicates and create one clean final TXT file out of it.
I tried sort with --parallel but it ran for 3 days ...
1
vote
1
answer
2k
views
ls -lt not working in SFTP
I log into sftp:
sftp user@server
Then I run:
ls -lt
I expect files to be sorted by date.
sftp> ls -lt *.csv
-rw------- 0 76547986 200 5073032 Mar 14 08:42 file1.csv
-rw------- 0 ...
0
votes
1
answer
177
views
Cron Apache Access Log Keep Certain Lines Remove Duplicates
I'm trying to create a nightly cron that keeps certain lines from the access_log (into a file), then removes (near) duplicates from that file, then empties the access log and restarts Apache.
I have ...
3
votes
1
answer
5k
views
Sort installed packages version
I'm trying to get last version of installed kernel package.
The main difficulty is that in my case the versions may be installed in a wrong order, so I cannot simply use the --last argument from rpm.
...
0
votes
1
answer
138
views
Sort the output of the "who" command
I'm trying to sort the output of the who command but I guess I'm kinda lost on this one.
I want to sort it based on who just logged in.
Thanks
0
votes
2
answers
3k
views
linux + delete duplicate IP's from file
what the best way to remove duplicate IP's from file
I use the command:
sort file | uniq
but I am not sure if this is the best way , maybe I missed something?
remark: my file contain two ...
1
vote
2
answers
39k
views
How to view specific interval of timestamp in huge log file?
How to view what happened to server in specific time period and specific date?
For example:
I want to see what happened 23.03.2013 from 6-8am
i want to use command line, maybe cat+grep+sort ?
log ...
6
votes
1
answer
1k
views
File size limit exceeded in bash
I have tried this shell script on a SUSE 10 server, kernel 2.6.16.60, ext3 filesystem
the script has problem like this:
cat file | awk '{print $1" "$2" "$3}' | sort -n > result
the file's size ...
1
vote
2
answers
774
views
postfix sort mails using a cronjob
My mailserver consists of dovecot and postfix.
I am receiving alot of mails from different mailing lists. These mails should directly go into my inbox when they come in, because it is easier to ...
6
votes
3
answers
4k
views
Sorting large binary files
Is there Unix utility for sorting large files containing fixed length binary records?
In other words, I'm looking for something like sort(1) but for binary files with fixed length records.
I could ...
1
vote
2
answers
1k
views
Continual tailing and sorting of multiple files on linux?
Is there a way to use pipes or FIFO in combination to continually monitor several (same format) log files whilst sorting on the first field and then being able to effectively do a tail -f on that ...
0
votes
2
answers
2k
views
Solaris + sort file according to date and time by sort command
I have along list that created in /var/tmp/file.txt from some script (in Solaris machine)
the following list have 4 fields
please advice how to sort the list according to the following TIMESTAMP ( by ...
9
votes
3
answers
20k
views
How to sort top result on virtual memory on Redhat Linux?
There is an interactive key "M" to sort by memory, which seems to be sorting on resident memory. Is there a way to sort on virtual memory? I happen to be working on Redhat Linux, but the question is ...
1
vote
1
answer
1k
views
Method for sorting VMWareVMs by annotation fields
Background:
One of the policies of our vCenter cluster is for (almost) every VM to have an "expiration date". This is a custom field in the annotations panel that is mainly a reminder to contact the ...
29
votes
10
answers
10k
views
Sort a list of domain names (FQDNs) starting from tld and working left
I am looking to sort a list of domain names (a web filter whitelist) starting from the TLD and working upwards. I am looking any *nix or windows tools that can do this easily, though a script would ...
8
votes
1
answer
19k
views
Find, and sort results by date created
How can I sort the results of find? I want to sort by date created asc?
find /docs -type f | sort
Sorts by filename not date created. Thanks.
7
votes
2
answers
972
views
Unix sort for partially ordered data sets
So I have an enormously large file (around 10GB) and need to sort it, just like in using 'sort' utility, but kindof more effectively.
Problem is, that I don't have memory, CPU power, time, nor free ...
-1
votes
3
answers
2k
views
Sorting IPv4 Addresses [closed]
So I've run into a quandary on sorting IPv4 addresses, and didn't know if there was a set rule in some obscure networking document. Do I do a straight sort on the raw address only (such as converting ...
3
votes
3
answers
296
views
How to set sort(1) to use a custom collation?
I have a text file containing one record per line which I'd like to sort alphabetically, except that I want '-' to sort after '[' and ']'. (The natural sort order has '-' before the square brackets.) ...
6
votes
4
answers
3k
views
need high performance /bin/sort; any suggestions?
I'm looking for a high performance /bin/sort drop in replacement. I know there is pbzip2 for using multiple cores, but is there a similar product for /bin/sort?
I've found distsort.sh, but I want ...
1
vote
3
answers
902
views
Perfectly reproducable select statement default ordering issue
I've recently been chasing an issue with a client's db... solution found, but impossible to recreate.
Essentially, we're doing a
Select * from mytable where ArbitraryColumn = 75
Where MyTable has ...
0
votes
3
answers
1k
views
Increase the performance of sort command on a multi-processor Sun Solaris box
I have a bunch of (rather large i.e. >100MB) comma separated files which needs sorting on 4 processor box with SunOS 5.10
Sort appears to run rather slow (minutes)
I am wondering if there is any way ...
4
votes
1
answer
910
views
How can I sort ls -l /dev by type and major and minor device number?
How can I sort the /dev directory by type and major and minor device number when doing ls -l?
The best way I've found so far is:
ls -l /dev | sort -k 1.1,1.2 -k 5n -k 6n | less
Is there a better ...