Difference between revisions of "Sort"
Jump to navigation
Jump to search
(Created page with "{{Draft}} == See also == * {{cat}} Category:Linux") |
|||
(17 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{lowercase}} |
+ | <code>sort</code> command included in <code>[[coreutils]]</code> package | ||
+ | * Man: https://man7.org/linux/man-pages/man1/sort.1.html | ||
+ | == Examples == | ||
+ | * <code>sort -rnk2</code> | ||
+ | * <code>[[find .]] -ls | sort -rnk7 | more</code> | ||
+ | * Sort by last [[column]]: <code>cat file | awk '{print $NF,$0}' | [[sort -rn]] | cut -f2- -d' '</code> | ||
+ | |||
+ | == Errors == | ||
+ | sort: write failed: /tmp/sortXksILS: [[No space left on device]] | ||
+ | |||
+ | == Related == | ||
+ | * <code>[[tsort]]</code> | ||
+ | * <code>[[jq]] '[[sort_by]](.your_field) | reverse'</code> | ||
+ | |||
+ | == Activities == | ||
+ | * Read https://unix.stackexchange.com/questions/tagged/sort?tab=Votes | ||
== See also == | == See also == |
Latest revision as of 18:27, 30 September 2022
sort
command included in coreutils
package
Contents
Examples[edit]
sort -rnk2
find . -ls | sort -rnk7 | more
- Sort by last column:
cat file | awk '{print $NF,$0}' | sort -rn | cut -f2- -d' '
Errors[edit]
sort: write failed: /tmp/sortXksILS: No space left on device
Related[edit]
Activities[edit]
See also[edit]
Advertising: