Manual / comm
comm(1)
| COMM(1) | General Commands Manual | COMM(1) |
NAME
comm - print lines common to two files
SYNOPSIS
comm [-123] file1 file2
DESCRIPTION
Comm reads file1 and file2, which should be in sort, and produces a three-column output: lines only in file1; lines only in file2; and lines in both files.
Flags 1, 2, or 3 suppress printing of the corresponding column. Thus comm -12 prints only the lines common to the two files; comm -23 prints only lines in the first file but not in the second; comm -123 prints nothing. Remaining columns are separated by tabs.
FILES
/usr/man/COMM this page
SEE ALSO
DIAGNOSTICS
Exit status is 0 on success, 2 for input-open or usage errors.
BUGS
Both operands must be file names; '-' is not a standard-input alias. Sorted order is assumed, not checked. Lines longer than 255 bytes are treated as several logical lines.
| September 19, 2026 | maux |