UNIQ(1)

πŸ“¦ version 0.12.0, in arch rolling

πŸ’… uniq β€” the manual, but make it make sense πŸ¦‹

okay bestie so you've stumbled into the UNIQ(1) page and honestly? you're gonna slay this. it's a General Commands Manual situation, it's iconic, it's giving "small tool, big personality." let's go ✨


🌸 NAME 🌸

uniq β€” literally just reports repeated lines, or omits them. that's the whole gig. main character energy tbh πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

uniq [OPTION]... [INPUT [OUTPUT]]

that's it. that's the vibe check. options first if you want em, then the input, then the output. 🫢


πŸ’– DESCRIPTION πŸ’–

Report or omit repeated lines. periodt. that's the description. she said what she said. πŸ”₯


✨ OPTIONS ✨

okay this is the part where you take notes, bestie, because these flags are the whole personality πŸ’œ

  • -D, --all-repeated[=<delimit-method>] β€” print all the duplicate lines. delimiting happens with blank lines. the default is none ngl 🫢 the possible values are literally:
    • none
    • prepend
    • separate
  • --group[=<group-method>] β€” shows you all the items, and separates groups with an empty line. default is separate πŸŽ€ the possible values, bestie:
    • separate
    • prepend
    • append
    • both
  • -w, --check-chars <N> β€” compare no more than N characters in lines. so like, only the first N chars get compared, okurrr ⭐
  • -c, --count β€” prefix lines by the number of occurrences. she's counting her blessings fr fr πŸ’–
  • -i, --ignore-case β€” ignore differences in case when comparing. so Hello and hello are the same girlie apparently 😭
  • -d, --repeated β€” only print duplicate lines. we only want the ones that showed up more than once πŸ‘‘
  • -s, --skip-chars <N> β€” avoid comparing the first N characters. she's skipping the intro, we're here for the chorus πŸ’€
  • -f, --skip-fields <N> β€” avoid comparing the first N fields. same energy, but with fields 🌈
  • -u, --unique β€” only print unique lines. no duplicates allowed in this house πŸ™ˆ
  • -z, --zero-terminated β€” end lines with a 0 byte, not newline. chaotic but valid πŸ“
  • -h, --help β€” Print help. your lil "what do I do" button 🧚
  • -V, --version β€” Print version. the "who even are you" button πŸ’…

πŸ¦‹ EXTRA πŸ¦‹

so what does she actually do? she filters adjacent matching lines from INPUT (or standard input), and writes them out to OUTPUT (or standard output). simple, clean, effective πŸ’œ

⚠️ okay this is the important one, bestie β€” uniq does not detect repeated lines unless they are adjacent. like, they have to be right next to each other or she simply won't see them. no cap. you might want to sort the input first, or just use sort -u without uniq at all. iykyk 😭

⭐ VERSION ⭐

v(uutils coreutils) 0.12.0 β€” yeah that's the version, she's fancy 🌸


and that's the whole page bestie, you ate that πŸ’…βœ¨ this was UNIQ(1) from the General Commands Manual, dated 2026-09-17 β€” go forth and deduplicate, you gorgeous genius πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from