Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

comm

Compare two sorted files line by line

Syntax

comm [OPTION]... FILE1 FILE2

Common Options

-1Suppress lines unique to FILE1
-2Suppress lines unique to FILE2
-3Suppress lines common to both
-iCase-insensitive comparison

Common Examples

comm file1.txt file2.txt

Compare two files

comm -12 file1.txt file2.txt

Show common lines only

comm -23 file1.txt file2.txt

Show lines unique to FILE1

comm -3 file1.txt file2.txt

Show unique lines from both

Related Commands

Related Tools

More Code & Dev Tools