1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.50.1.
.TH COMM "1" "February 2026" "GNU coreutils 9.10" "User Commands"
.SH NAME
comm \- compare two sorted files line by line
.SH SYNOPSIS
.B comm
[\fI\,OPTION\/\fR]... \fI\,FILE1 FILE2\/\fR
.SH DESCRIPTION
.\" Add any additional description here
.PP
Compare sorted files FILE1 and FILE2 line by line.
.PP
When FILE1 or FILE2 (not both) is \-, read standard input.
.PP
With no options, produce three\-column output. Column one contains
lines unique to FILE1, column two contains lines unique to FILE2,
and column three contains lines common to both files.
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#comm-1'\fB\-1\fP\X'tty: link'
suppress column 1 (lines unique to FILE1)
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#comm-2'\fB\-2\fP\X'tty: link'
suppress column 2 (lines unique to FILE2)
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#comm-3'\fB\-3\fP\X'tty: link'
suppress column 3 (lines that appear in both files)
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#comm--check-order'\fB\-\-check\-order\fP\X'tty: link'
check that the input is correctly sorted,
even if all input lines are pairable
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#comm--nocheck-order'\fB\-\-nocheck\-order\fP\X'tty: link'
do not check that the input is correctly sorted
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#comm--output-delimiter'\fB\-\-output\-delimiter=STR\fP\X'tty: link'
separate columns with STR
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#comm--total'\fB\-\-total\fP\X'tty: link'
output a summary
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#comm-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/comm#comm--help'\fB\-\-help\fP\X'tty: link'
display this help and exit
.TP
\X'tty: link https://www.gnu.org/software/coreutils/comm#comm--version'\fB\-\-version\fP\X'tty: link'
output version information and exit
.PP
Comparisons honor the rules specified by 'LC_COLLATE'.
.SH EXAMPLES
.TP
comm \-12 file1 file2
Print only lines present in both file1 and file2.
.TP
comm \-3 file1 file2
Print lines in file1 not in file2, and vice versa.
.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: <https://www.gnu.org/software/coreutils/>
.br
General help using GNU software: <https://www.gnu.org/gethelp/>
.br
Report any translation bugs to <https://translationproject.org/team/>
.SH COPYRIGHT
Copyright \(co 2026 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
.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"
\fBjoin\fP(1), \fBuniq\fP(1)
.PP
.br
Full documentation <https://www.gnu.org/software/coreutils/comm>
.br
or available locally via: info \(aq(coreutils) comm invocation\(aq
|