COMM(1) General Commands Manual COMM(1)

# [NAME](#NAME)

comm - Compare two sorted files line by line.

When FILE1 or FILE2 (not both) is -, read standard input.

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.

# [SYNOPSIS](#SYNOPSIS)

**comm** \[OPTION]... FILE1 FILE2

# [DESCRIPTION](#DESCRIPTION)

Compare two sorted files line by line.

When FILE1 or FILE2 (not both) is -, read standard input.

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.

# [OPTIONS](#OPTIONS)

**-1**

suppress column 1 (lines unique to FILE1)

**-2**

suppress column 2 (lines unique to FILE2)

**-3**

suppress column 3 (lines that appear in both files)

[**--output-delimiter** *&lt;STR&gt;*](#output)

separate columns with STR

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

line delimiter is NUL, not newline

[**--total**](#total)

output a summary

[**--check-order**](#check)

check that the input is correctly sorted, even if all input lines are pairable

[**--nocheck-order**](#nocheck)

do not check that the input is correctly sorted

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

Print help

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

Print version

&lt;*FILE1*&gt;

&lt;*FILE2*&gt;

# [VERSION](#VERSION)

v(uutils coreutils) 0.12.0

2026-09-17

---

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