Software:comp (command)

From HandWiki

comp
ReactOS-0.4.13 comp command 667x482.png
The ReactOS comp command
Developer(s)DEC, IBM, Microsoft, Digital Research, Novell, Paul Vojta, ReactOS Contributors
Initial releaseAugust 1981; 42 years ago (1981-08)
Operating systemOS/8, PC DOS, MS-DOS, FlexOS, SISNE plus, OS/2, Windows, DR DOS, FreeDOS, ReactOS
TypeCommand
LicenseFreeDOS: MIT
ReactOS: GNU GPL 2

In computing, comp is a command used on DEC OS/8,[1] DOS,[2] DR FlexOS,[3] IBM OS/2,[4] Microsoft Windows[5] and related computer operating systems such as ReactOS. It is used to perform comparisons of multiple computer files to show the differences between them.[6]

History

COMP.COM in IBM PC DOS 1.0

In DOS, the comp command first appeared in PC DOS 1.0[7] and has been included in most versions of MS-DOS and PC DOS. A newer command, fc was added in DOS 3.3 which allows for line comparisons in addition to binary comparisons. DR DOS 6.0 also includes an implementation of the comp command.[8]

The FreeDOS version was developed by Paul Vojta and is licensed under the MIT License.[9] Ged Murphy developed the ReactOS version. It is licensed under the GNU GPL 2.[10]

The command is also available in the EFI shell.[11]

Syntax

The command-syntax is:[12]

comp [<Data1>] [<Data2>] [/d] [/a] [/l] [/n=<Number>] [/c]

Parameters

  • <Data1> – Location and name of the first file or set of files
  • <Data2> – Location and name of the second file or set of files
  • /d – Display differences in decimal format (Default is hexadecimal)
  • /a – Display differences as characters
  • /l – Display the number of the line, instead of the byte offset
  • /n=<Number> – Compare only the specified number of lines for each file
  • /c – Perform a non case-sensitive comparison
  • /off[line] – Process files with the offline attribute set
  • /? – Display Help

See also

References

Further reading

  • Special Edition Using MS-DOS 6.22, Third Edition. Que Publishing. 2001. ISBN 978-0789725738. 
  • Dyson, Peter (1995). Mastering OS/2 Warp. Sybex. ISBN 978-0782116632. 
  • Stanek, William R. (2008). Windows Command-Line Administrator's Pocket Consultant, 2nd Edition. Microsoft Press. ISBN 978-0735622623. 

External links