| 1 |
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.50.1. |
| 2 |
.TH UNIQ "1" "February 2026" "GNU coreutils 9.10" "User Commands" |
| 3 |
.SH NAME |
| 4 |
uniq \- report or omit repeated lines |
| 5 |
.SH SYNOPSIS |
| 6 |
.B uniq |
| 7 |
[\fI\,OPTION\/\fR]... [\fI\,INPUT \/\fR[\fI\,OUTPUT\/\fR]] |
| 8 |
.SH DESCRIPTION |
| 9 |
.\" Add any additional description here |
| 10 |
.PP |
| 11 |
Filter adjacent matching lines from INPUT (or standard input), |
| 12 |
writing to OUTPUT (or standard output). |
| 13 |
.PP |
| 14 |
With no options, matching lines are merged to the first occurrence. |
| 15 |
.PP |
| 16 |
Mandatory arguments to long options are mandatory for short options too. |
| 17 |
.TP |
| 18 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-c'\fB\-c, \-\-count\fP\X'tty: link' |
| 19 |
prefix lines by the number of occurrences |
| 20 |
.TP |
| 21 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-d'\fB\-d, \-\-repeated\fP\X'tty: link' |
| 22 |
only print duplicate lines, one for each group |
| 23 |
.TP |
| 24 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-D'\fB\-D\fP\X'tty: link' |
| 25 |
print all duplicate lines |
| 26 |
.TP |
| 27 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq--all-repeated'\fB\-\-all\-repeated[=METHOD]\fP\X'tty: link' |
| 28 |
like \fB\-D\fR, but allow separating groups with an empty line; |
| 29 |
METHOD={none(default),prepend,separate} |
| 30 |
.TP |
| 31 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-f'\fB\-f, \-\-skip\-fields=\,N\fP\X'tty: link'\/\fR |
| 32 |
avoid comparing the first N fields |
| 33 |
.TP |
| 34 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq--group'\fB\-\-group[=METHOD]\fP\X'tty: link' |
| 35 |
show all items, separating groups with an empty line; |
| 36 |
METHOD={separate(default),prepend,append,both} |
| 37 |
.TP |
| 38 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-i'\fB\-i, \-\-ignore\-case\fP\X'tty: link' |
| 39 |
ignore differences in case when comparing |
| 40 |
.TP |
| 41 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-s'\fB\-s, \-\-skip\-chars=\,N\fP\X'tty: link'\/\fR |
| 42 |
avoid comparing the first N characters |
| 43 |
.TP |
| 44 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-u'\fB\-u, \-\-unique\fP\X'tty: link' |
| 45 |
only print unique lines |
| 46 |
.TP |
| 47 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-z'\fB\-z, \-\-zero\-terminated\fP\X'tty: link' |
| 48 |
line delimiter is NUL, not newline |
| 49 |
.TP |
| 50 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#uniq-w'\fB\-w, \-\-check\-chars=\,N\fP\X'tty: link'\/\fR |
| 51 |
compare no more than N characters in lines |
| 52 |
.TP |
| 53 |
\X'tty: link https://www.gnu.org/software/coreutils/uniq#uniq--help'\fB\-\-help\fP\X'tty: link' |
| 54 |
display this help and exit |
| 55 |
.TP |
| 56 |
\X'tty: link https://www.gnu.org/software/coreutils/uniq#uniq--version'\fB\-\-version\fP\X'tty: link' |
| 57 |
output version information and exit |
| 58 |
.PP |
| 59 |
A field is a run of blanks (usually spaces and/or TABs), then non\-blank |
| 60 |
characters. Fields are skipped before chars. |
| 61 |
.PP |
| 62 |
\&'uniq' does not detect repeated lines unless they are adjacent. |
| 63 |
You may want to sort the input first, or use 'sort \fB\-u\fR' without 'uniq'. |
| 64 |
.SH AUTHOR |
| 65 |
Written by Richard M. Stallman and David MacKenzie. |
| 66 |
.SH "REPORTING BUGS" |
| 67 |
Report bugs to: bug\[email protected] |
| 68 |
.br |
| 69 |
GNU coreutils home page: <https://www.gnu.org/software/coreutils/> |
| 70 |
.br |
| 71 |
General help using GNU software: <https://www.gnu.org/gethelp/> |
| 72 |
.br |
| 73 |
Report any translation bugs to <https://translationproject.org/team/> |
| 74 |
.SH "SEE ALSO" |
| 75 |
\fBcomm\fP(1), \fBjoin\fP(1), \fBsort\fP(1) |
| 76 |
.PP |
| 77 |
.br |
| 78 |
Full documentation <https://www.gnu.org/software/coreutils/uniq> |
| 79 |
.br |
| 80 |
or available locally via: info \(aq(coreutils) uniq invocation\(aq |
| 81 |
.PP |
| 82 |
.br |
| 83 |
Packaged by Debian (9.10\-1) |
| 84 |
.br |
| 85 |
Copyright \(co 2026 Free Software Foundation, Inc. |
| 86 |
.br |
| 87 |
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. |
| 88 |
.br |
| 89 |
This is free software: you are free to change and redistribute it. |
| 90 |
.br |
| 91 |
There is NO WARRANTY, to the extent permitted by law. |