Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/c/cmp.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/c/cmp.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/c/cmp.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/c/cmp.html on line 8

cmp

Compare two files (POSIX)

Syntax:

cmp [-l|-s] file1 file2

Runs on:

Neutrino

Options:

-l
(“el”) Print the byte position (in decimal) and the differing bytes (octal) for all differences (not just the first one) between the two files.
-s
Be silent. Return the exit status only.
file1
The pathname of the first file to be compared. If file1 is the dash (-) character, standard input is used.
file2
The pathname of the second file to be compared.

Description:

The cmp utility compares two files.


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

If you don't specify any options, cmp behaves as follows:

If you specify both the -s and -l options, nothing is printed (no long output).

Examples:

Compare the files myfile.dat and save.dat:

cmp myfile.dat save.dat

Exit status:

0
The files are identical.
1
The files differ. This includes cases where one file is identical to the first part of the other. In such cases, if you haven't specified the -s option, cmp writes to standard error a message that EOF was reached in the shorter file (before any differences were found).
>1
An error occurred.

See also:

cksum, diff, patch, wc


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/c/cmp.html on line 134

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/c/cmp.html on line 134