GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
CMP(1) FreeBSD General Commands Manual CMP(1)

cmp - compare two files

cmp [ -lsL ] file1 file2 [ offset1 [ offset2 ] ]

The two files are compared. A diagnostic results if the contents differ, otherwise there is no output.

The options are:

Print the byte number (decimal) and the differing bytes (hexadecimal) for each difference.
Print nothing for differing files, but set the exit status.
Print the line number of the first differing byte.

If offsets are given, comparison starts at the designated byte position of the corresponding file. Offsets that begin with 0x are hexadecimal; with 0, octal; with anything else, decimal.

/src/cmd/cmp.c

diff(1)

If a file is inaccessible or missing, the exit status is If the files are the same, the exit status is empty (true). If they are the same except that one is longer than the other, the exit status is Otherwise cmp reports the position of the first disagreeing byte and the exit status is


Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.