COMM(1)
๐ COMM(1) ๐
okay bestie, so this is comm โ it lives in the User Commands section of your manual, and it's literally the group-chat moderator for two sorted files. ๐
โจ NAME โจ
comm โ compare two sorted files line by line ๐ฆ
๐ธ SYNOPSIS ๐ธ
comm [OPTION]... FILE1 FILE2
๐ DESCRIPTION ๐
So here's the vibe: you give it FILE1 and FILE2, both sorted, and it compares them line by line. That's it, that's the whole personality. ๐
And when FILE1 or FILE2 is -? It reads standard input instead. Slay. ๐ซถ
With no options at all, you get three-column output:
- Column one โ lines unique to FILE1 ๐
- Column two โ lines unique to FILE2 โจ
- Column three โ lines common to both files ๐
Now the options, bestie, listen up:
-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) ๐ญ--check-orderโ check that the input is correctly sorted, even if all input lines are pairable--nocheck-orderโ do not check that the input is correctly sorted--output-delimiter=STRโ separate columns with STR ๐--totalโ output a summary ๐ง-z,--zero-terminatedโ line delimiter isNUL, not newline โญ--helpโ display this help and exit--versionโ output version information and exit
and one more thing, no cap: comparisons honor the rules specified by 'LC_COLLATE'. ๐
๐ EXAMPLES ๐
comm -12 file1 file2 Print only lines present in both file1 and file2.
comm -3 file1 file2 Print lines in file1 not in file2, and vice versa.
๐ AUTHOR ๐
Written by Richard M. Stallman and David MacKenzie. iconic behavior honestly ๐ซถ
๐ REPORTING BUGS ๐
Report bugs to: <bug-coreutils@gnu.org>. Report any translation bugs to: <https://translationproject.org/team/>. GNU coreutils home page: <https://www.gnu.org/software/coreutils/> General help using GNU software: <https://www.gnu.org/gethelp/>
๐ COPYRIGHT ๐
Copyright ยฉ 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
๐ฆ SEE ALSO ๐ฆ
Full documentation <https://www.gnu.org/software/coreutils/comm> or available locally via: info '(coreutils) comm invocation'
okay that's the whole page, you ate that ๐ this was GNU coreutils 9.12, dated September 2026, and yes the footer says COMM(1) again because it loves being the main character ๐โจ
๐ฆ where this page comes from
- arch rolling: coreutils 9.12-2 ยท GPL-3.0-or-later AND GFDL-1.3-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms