UNIQ(1) General Commands Manual UNIQ(1)

# [NAME](#NAME)

uniq - Report or omit repeated lines.

# [SYNOPSIS](#SYNOPSIS)

**uniq** \[OPTION]... \[INPUT \[OUTPUT]]

# [DESCRIPTION](#DESCRIPTION)

Report or omit repeated lines.

# [OPTIONS](#OPTIONS)

[**-D**, **--all-repeated**\[=*&lt;delimit-method&gt;*\]](#D)

print all duplicate lines. Delimiting is done with blank lines. \[default: none]

*Possible values:*

- none
- prepend
- separate

[**--group**\[=*&lt;group-method&gt;*\]](#group)

show all items, separating groups with an empty line. \[default: separate]

*Possible values:*

- separate
- prepend
- append
- both

[**-w**, **--check-chars** *&lt;N&gt;*](#w)

compare no more than N characters in lines

[**-c**, **--count**](#c)

prefix lines by the number of occurrences

[**-i**, **--ignore-case**](#i)

ignore differences in case when comparing

[**-d**, **--repeated**](#d)

only print duplicate lines

[**-s**, **--skip-chars** *&lt;N&gt;*](#s)

avoid comparing the first N characters

[**-f**, **--skip-fields** *&lt;N&gt;*](#f)

avoid comparing the first N fields

[**-u**, **--unique**](#u)

only print unique lines

[**-z**, **--zero-terminated**](#z)

end lines with 0 byte, not newline

[**-h**, **--help**](#h)

Print help

[**-V**, **--version**](#V)

Print version

# [EXTRA](#EXTRA)

Filter adjacent matching lines from INPUT (or standard input), writing to OUTPUT (or standard output).

Note: uniq does not detect repeated lines unless they are adjacent. You may want to sort the input first, or use sort -u without uniq.

# [VERSION](#VERSION)

v(uutils coreutils) 0.12.0

2026-10-12

---

Document: uniq(1) from uutils 0.12.0-r3 (Chainguard OS)
Source: https://github.com/uutils/coreutils
