Forrest logo
back to context overview

uniq

List of commands for uniq:

  • uniq:tldr:21d52 uniq: Display number of occurrences of each line, sorted by the most frequent.
    $ sort ${filename} | uniq -c | sort -nr
    try on your machine
    explain this command
  • uniq:tldr:90d6c uniq: Display only duplicate lines.
    $ sort ${filename} | uniq -d
    try on your machine
    explain this command
  • uniq:tldr:99184 uniq: Display only unique lines.
    $ sort ${filename} | uniq -u
    try on your machine
    explain this command
  • uniq:tldr:e90e6 uniq: Display each line once.
    $ sort ${filename} | uniq
    try on your machine
    explain this command
  • uniq:tldr:f0c2a uniq: Display number of occurrences of each line along with that line.
    $ sort ${filename} | uniq -c
    try on your machine
    explain this command
back to context overview