cmp

QNX SDP8.0Utilities ReferenceUtilities

Compare two files (POSIX, toybox)

Syntax:

cmp [-ls] [-n len] file1 [file2 [skip1 [skip2]]]

Runs on:

QNX OS

Options:

-l
("el") Show all differing bytes.
-n len
Compare at most len bytes.
-s
Be silent; suppress normal output.
file1
The pathname of the first file that is being compared.
file2
The pathname of the second file that is being compared.
skip1
Skip the specified number of bytes in file1.
skip2
Skip the specified number of bytes in file2.

Description:

The cmp utility compares two files. If only one file is given, the file is compared to the standard output.

Note:
This utility is intended for comparing binary files, if you want to compare text files, use diff.

This utility is provided as part of the toybox package. For information on how to enable it, see toybox.

Contributing author:

Rob Landley and the toybox project (see https://landley.net/toybox/).

Page updated: