uniq - print or omit repeated lines - Video Man Pages @DistroTube
uniq - print or omit repeated lines - Video Man Pages  @DistroTube
Uploaded October 2025 | Updated November 2026, 1 day ago
The 'uniq' command is used to print or omit repeated lines of text.

- Display each line once (duplicate lines printed only once):
sort path/to/file | uniq

- Display only unique lines (duplicate lines not printed at all):
sort path/to/file | uniq -u

- Display only duplicate lines (duplicate lines printed only once):
sort path/to/file | uniq -d

- Display only duplicate line and count number of occurrences of each line:
sort path/to/file | uniq -cd

- Compare no more than 5 characters in lines:
sort path/to/file | uniq -w 5

- Avoid comparing the first 5 characters in lines:
sort path/to/file | uniq -s 5

REFERENCED:
β–Ί gitlab.com/dwt1/vidman

WANT TO SUPPORT THE CHANNEL?
πŸ’° Patreon: patreon.com/distrotube
πŸ’³ Paypal: paypal.com/donate/?hosted_button_id=MW3ZFGS8Q9JGW
πŸ›οΈ Amazon: amzn.to/2RotFFi
πŸ‘• Teespring: teespring.com/stores/distrotube

DT ON THE WEB:
πŸ•ΈοΈ Website: http://distro.tube
πŸ“ GitLab: gitlab.com/dwt1
πŸ—¨οΈ Mastodon: fosstodon.org/@distrotube
πŸ‘« Reddit: reddit.com/r/DistroTube
πŸ“½οΈ Odysee: odysee.com/@DistroTube:2

FREE AND OPEN SOURCE SOFTWARE THAT I LIKE:
🌐 Brave Browser - brave.com
πŸ“½οΈ Open Broadcaster Software: obsproject.com
🎬 Kdenlive: kdenlive.org
🎨 GIMP: gimp.org
πŸ’» VirtualBox: virtualbox.org
πŸ—’οΈ Doom Emacs: github.com/hlissner/doom-emacs

Your support is very much appreciated. Thanks, guys!
uniq - print or omit repeated lines - Video Man PagesCommunity Game Night LIVE! - XonoticDrop Windows and Install AnduinOS (Made By Microsoft Employee)Wallpaper Setter For All Window Managers X11 and WaylandCreate Beautiful Websites With HugoA Quick First Look At Fedora 43Is It Time To Leave Arch Linux?Chat With Patrons (Jun 29, 2025)Hey, DT! Viewers Leave Me Voice Messages (What Could Go Wrong?!)Help Vampires Are The Reason The Linux Community Is Toxic!Linux Distros Should Stop Worrying About Their DesktopsDTOS Needs Some Work, So Lets Do It!
DistroTube |

'uniq' - print or omit repeated lines - Video Man Pages

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER