Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cmp(1) — Sprite KS.390

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

diff(1)

comm(1)

CMP  —  User Commands

NAME

cmp − compare two files

SYNOPSIS

cmp [ −l ] [ −s ] file1 file2 [ skip1 ] [ skip2 ]

DESCRIPTION

The two files are compared.  (If file1 is ‘−’, the standard input is used.)  With no options, cmp makes no comment if the files are the same; if they differ, it reports the byte and line number at which the difference occurred, or, that one file is an initial subsequence of the other.  Skip1 and skip2 are initial byte offsets into file1 and file2 respectively, and may be either octal or decimal; a leading “0” denotes octal. 

Options:

−s Print nothing for differing files; set exit codes only. 

−l Print the byte number (in decimal) and the differing bytes (in octal) for all differences between the two files. 

SEE ALSO

diff(1), comm(1)

DIAGNOSTICS

Exit code 0 is returned for identical files, 1 for different files, and 2 for an inaccessible or missing argument, or a system error. 

Sprite version 1.0  —  November 18, 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026