Comp (command)
| Company type | Command-line utility |
|---|---|
| Industry | Computing / Software |
| Founded | 1981 |
| Founder | IBM / Microsoft (PC DOS) |
| Products | File comparison tool |
| Website | docs |
In the realm of computing, the comp command is utilized on platforms such as DEC's OS/8, various DOS derivatives, DR FlexOS, IBM OS/2, Microsoft Windows, and similar systems like ReactOS. Its primary function is to compare files and detect discrepancies between them.
History
The comp utility was first introduced with PC DOS 1.0 and has been a standard feature in most iterations of MS-DOS and PC DOS. With the release of DOS 3.3, the fc command was added, offering line-by-line file comparison in addition to binary analysis. DR DOS 6.0 also includes its own version of the comp command.
Paul Vojta developed the FreeDOS variant under the MIT License, whereas Ged Murphy created the ReactOS adaptation licensed under GNU GPL version 2.
Moreover, the comp command is incorporated within the Unified Extensible Firmware Interface (EFI) shell, facilitating file comparisons across diverse firmware platforms.
Syntax
The general syntax for this command is:
comp [<Data1>] [<Data2>] [/d] [/a] [/l] [/n=<Number>] [/c]
Parameters
<Data1>– Specifies the path and filename(s) of the first file or group of files<Data2>– Specifies the path and filename(s) of the second file or group of files/d– Shows differences using decimal notation instead of the default hexadecimal/a– Displays differing bytes as characters/l– Lists line numbers rather than byte positions/n=<Number>– Limits comparison to a set number of lines per file/c– Conducts a case-insensitive comparison/off[line]– Includes files marked with the offline attribute in processing/?– Provides help information