UNIQ Commands Cheat Sheet

Here is a cli commands cheat sheet for UNIQ command, you can use this as a quick reminder for basic commands with a brief description for each of the commands.

What is UNIQ command?

Add some data here

        # To show all lines without duplication:
# (`sort -u` and `uniq` have the same effect.)
sort  | uniq

# To show not duplicated lines:
sort  | uniq -u

# To show duplicated lines only:
sort  | uniq -d

# To count all lines:
sort  | uniq -c

# To count not duplicated lines:
sort  | uniq -uc

# To count only duplicated lines:
sort  | uniq -dc
    

Check out the UNIQ command documentation .


You can also check our MegaSh cheatsheet tool, that has 150+ searchable linux cheat sheets in one page, so you never forget a command as you work again

Check Also

Best AI tools list