Comm
From Wikipedia, the free encyclopedia
- The correct title of this article is comm. The initial letter is shown capitalized due to technical restrictions.
The comm command in Unix is a utility that is used to compare two files. It shows common lines in one column and differing lines in separate columns for left and right files. This functionally is similar to diff.
One notable difference between comm and diff is that comm will not try to indicate that a line has "changed" between the two files; lines are either shown in the "from file #1", "from file #2", or "in both" columns. This feature can be especially useful if one wishes two lines to be considered different even if they only have subtle differences.
comm also has options to suppress any of the three columns which is useful for a scripting.
[edit] See also
Unix command line programs and builtins (more) | |||
File and file system management: | cat | cd | chmod | chown | chgrp | cp | du | df | file | fsck | ln | ls | lsof | mkdir | mount | mv | pwd | rm | rmdir | split | touch | ||
Process management: | at | chroot | crontab | exit | kill | killall | nice | pgrep | pidof | pkill | ps | sleep | time | top | wait | watch | ||
User Management/Environment: | env | finger | id | mesg | passwd | su | sudo | uname | uptime | w | wall | who | whoami | write | ||
Text processing: | awk | comm | cut | ex | head | iconv | join | less | more | paste | sed | sort | tail | tr | uniq | wc | xargs | ||
Shell programming: | echo | expr | printf | unset | Printing: | lp |
Communications: inetd | netstat | ping | rlogin | traceroute |
Searching: find | grep | strings |
Miscellaneous: banner | bc | cal | man | size | yes |