sort
SafeSort / unique
sort -rh <file>
Sorts lines; pair with uniq to count duplicates; -h sorts sizes.
Examples
sort access.log | uniq -c | sort -rnMost frequent lines first
Syntax
sort [-n] [-r] [-h] [-k n] <file> | uniq [-c]
Before you run it
Read-only.
The same reference, with no signal at all
Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store