Difference between revisions of "Sort"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
{{Draft}}
 
 
{{lowercase}}
 
{{lowercase}}
 
<code>sort</code> command included in <code>[[coreutils]]</code> package
 
<code>sort</code> command included in <code>[[coreutils]]</code> package
 
* Man: https://man7.org/linux/man-pages/man1/sort.1.html
 
* Man: https://man7.org/linux/man-pages/man1/sort.1.html
 
 
 
 
 
sort: write failed: /tmp/sortXksILS: [[No space left on device]]
 
  
 
== Examples ==
 
== Examples ==
Line 14: Line 7:
 
* <code>[[find .]] -ls | sort -rnk7 | more</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>
 
* 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 ==
 
== Related ==

Revision as of 11:49, 18 January 2022

sort command included in coreutils package

Examples

  • sort -rnk2
  • find . -ls | sort -rnk7 | more
  • Sort by last column: cat file | awk '{print $NF,$0}' | sort -rn | cut -f2- -d' '


Errors

sort: write failed: /tmp/sortXksILS: No space left on device

Related

Activities

See also

Advertising: