svcadm(1M)을 검색하려면 섹션에서 1M 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
cmp(1)
cmp(1) User Commands cmp(1)
NAME
cmp - compare two files
SYNOPSIS
/usr/bin/cmp [-l | -s] file1 file2 [skip1] [skip2]
DESCRIPTION
cmp compares two files file1 and file2. cmp writes no output if the
files are the same. By default, if the files differ, the byte and line
number at which the first difference occurred are written to standard
output. Bytes and lines are numbered beginning with 1.
skip1 and skip2 are initial byte offsets into file1 and file2 respec‐
tively, and can be either octal or decimal. A leading 0 denotes octal.
If either file1 or files2 is -, cmp uses standard input for that oper‐
and.
OPTIONS
The following options are supported:
-l Write the decimal byte number and the differing bytes (in octal)
for each difference.
-s Write nothing for differing files. Return non-zero exit status
only.
OPERANDS
The following operands are supported:
file1 A path name of the first file to be compared. If file1 is −,
the standard input is used.
file2 A path name of the second file to be compared. If file2 is −,
the standard input is used.
If both file1 and file2 refer to standard input or refer to the same
FIFO special, block special or character special file, an error
results.
EXAMPLES
Example 1 Comparing Files Byte for Byte
The following example does a byte for byte comparison of file1 and
file2:
example% cmp file1 file2 0 1024
It skips the first 1024 bytes in file2 before starting the comparison.
ENVIRONMENT VARIABLES
See environ(7) for descriptions of the following environment variables
that affect the execution of cmp: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES,
and NLSPATH.
EXIT STATUS
The following error values are returned:
0 The files are identical.
1 The files are different. This includes the case where one file is
identical to the first part of the other.
>1 An error occurred.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Availabilitysystem/core-os _ CSIEnabled _ Interface
StabilityCommitted _ StandardSee standards(7).
SEE ALSO
comm(1), diff(1), attributes(7), environ(7), standards(7)
Oracle Solaris 11.4 4 Feb 2015 cmp(1)