O'Reilly logo

A Practical Guide to Red Hat® Linux® 8 by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

comm

Compares sorted files

comm [options] file1 file2

The comm utility displays a line-by-line comparison of two sorted files. (If the files have not been sorted, comm will not work properly.) The display is in three columns. The first column lists all the lines found only in file1, the second column lists lines found only in file2, and the third lists those common to both files. Lines in the second column are preceded by one TAB, and those in the third column are preceded by two TABs.

Arguments

The file1 and file2 are pathnames of the files that comm compares. You can use a hyphen in place of either file1 or file2 (but not both) to cause comm to read standard input.

Options

You can use the options -1, -2, and -3 individually or in combination. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required