.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.50.1.
.TH UNIQ "1" "April 2026" "GNU coreutils 9.11" "User Commands"
.SH NAME
uniq \- report or omit repeated lines
.SH SYNOPSIS
.B uniq
[\fI\,OPTION\/\fR]... [\fI\,INPUT \/\fR[\fI\,OUTPUT\/\fR]]
.SH DESCRIPTION
.\" Add any additional description here
.PP
Filter adjacent matching lines from INPUT (or standard input),
writing to OUTPUT (or standard output).
.PP
With no options, matching lines are merged to the first occurrence.
.PP
Mandatory arguments to long options are mandatory for short options too.
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-c'\fB\-c, \-\-count\fP\X'tty: link'
prefix lines by the number of occurrences
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-d'\fB\-d, \-\-repeated\fP\X'tty: link'
only print duplicate lines, one for each group
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-D'\fB\-D\fP\X'tty: link'
print all duplicate lines
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq--all-repeated'\fB\-\-all\-repeated[=METHOD]\fP\X'tty: link'
like \fB\-D\fR, but allow separating groups with an empty line;
METHOD={none(default),prepend,separate}
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-f'\fB\-f, \-\-skip\-fields=\,N\fP\X'tty: link'\/\fR
avoid comparing the first N fields
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq--group'\fB\-\-group[=METHOD]\fP\X'tty: link'
show all items, separating groups with an empty line;
METHOD={separate(default),prepend,append,both}
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-i'\fB\-i, \-\-ignore\-case\fP\X'tty: link'
ignore differences in case when comparing
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-s'\fB\-s, \-\-skip\-chars=\,N\fP\X'tty: link'\/\fR
avoid comparing the first N characters
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-u'\fB\-u, \-\-unique\fP\X'tty: link'
only print unique lines
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-z'\fB\-z, \-\-zero\-terminated\fP\X'tty: link'
line delimiter is NUL, not newline
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-w'\fB\-w, \-\-check\-chars=\,N\fP\X'tty: link'\/\fR
compare no more than N characters in lines
.TP
\X'tty: link https://www.gnu.org/software/coreutils/uniq#uniq--help'\fB\-\-help\fP\X'tty: link'
display this help and exit
.TP
\X'tty: link https://www.gnu.org/software/coreutils/uniq#uniq--version'\fB\-\-version\fP\X'tty: link'
output version information and exit
.PP
A field is a run of blanks (usually spaces and/or TABs), then non\-blank
characters. Fields are skipped before chars.
.PP
\&'uniq' does not detect repeated lines unless they are adjacent.
You may want to sort the input first, or use 'sort \fB\-u\fR' without 'uniq'.
.SH AUTHOR
Written by Richard M. Stallman and David MacKenzie.
.SH "REPORTING BUGS"
Report bugs to: bug\-coreutils@gnu.org
.br
GNU coreutils home page:
.br
General help using GNU software:
.br
Report any translation bugs to
.SH COPYRIGHT
Copyright \(co 2026 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later .
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH "SEE ALSO"
\fBcomm\fP(1), \fBjoin\fP(1), \fBsort\fP(1)
.PP
.br
Full documentation
.br
or available locally via: info \(aq(coreutils) uniq invocation\(aq