Annotation of 43BSDReno/usr.bin/cmp/cmp.1, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1987, 1990 The Regents of the University of California.
                      2: .\" All rights reserved.
                      3: .\"
                      4: .\" Redistribution and use in source and binary forms are permitted provided
                      5: .\" that: (1) source distributions retain this entire copyright notice and
                      6: .\" comment, and (2) distributions including binaries display the following
                      7: .\" acknowledgement:  ``This product includes software developed by the
                      8: .\" University of California, Berkeley and its contributors'' in the
                      9: .\" documentation or other materials provided with the distribution and in
                     10: .\" all advertising materials mentioning features or use of this software.
                     11: .\" Neither the name of the University nor the names of its contributors may
                     12: .\" be used to endorse or promote products derived from this software without
                     13: .\" specific prior written permission.
                     14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
                     15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
                     16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     17: .\"
                     18: .\"     @(#)cmp.1      6.4 (Berkeley) 7/24/90
                     19: .\"
                     20: .Dd July 24, 1990
                     21: .Dt CMP 1
                     22: .Os BSD 4.4
                     23: .Sh NAME
                     24: .Nm cmp
                     25: .Nd Compare two files.
                     26: .Sh SYNOPSIS
                     27: .Nm cmp
                     28: .Op Fl l Li \&| Fl s
                     29: .Ar file1 file2
                     30: .Sh DESCRIPTION
                     31: The cmp utility compares two files of any type and
                     32: writes the results to the standard output.
                     33: Under default options,
                     34: .Nm
                     35: is silent
                     36: if the files are the same; if they
                     37: differ, the byte and line
                     38: number at which the first difference occurred is reported.
                     39: Bytes and
                     40: lines are numbered beginning with one.
                     41: .Pp
                     42: The following options are available:
                     43: .Tw Ds
                     44: .Tp Fl l
                     45: Print the byte number (decimal) and the differing
                     46: byte values (octal) for each difference, respectively.
                     47: .Tp Fl s
                     48: Print nothing for differing files; return exit
                     49: status only.
                     50: .Tp
                     51: .Pp
                     52: The following operands are available:
                     53: .Tw file1
                     54: .Tp Ar file1
                     55: A pathname of the first file to be compared.
                     56: If
                     57: .Ar file1
                     58: is
                     59: .Sq Fl ,
                     60: the standard input is used.
                     61: .Tp Ar file2
                     62: A pathname of the second file to be compared.
                     63: .Tp
                     64: .Pp
                     65: The
                     66: .Nm cmp
                     67: utility exits with one of the following values:
                     68: .Tw Ds
                     69: .Tp 0
                     70: The files are identical.
                     71: .Tp 1
                     72: The files are different; this includes the case
                     73: where one file is identical to the first part of
                     74: the other.
                     75: In the latter case, if the
                     76: .Fl s
                     77: option has
                     78: not been specified, cmp writes to standard error
                     79: that EOF was reached in the shorter file (before
                     80: any differences were found).
                     81: .Tp >1
                     82: An error occurred.
                     83: .Tp
                     84: .Sh SEE ALSO
                     85: .Xr diff 1 ,
                     86: .Xr diff3 1
                     87: .Sh STANDARDS
                     88: The
                     89: .Nm cmp
                     90: function is expected to be POSIX 1003.2 compatible.
                     91: This manual page is derived from the POSIX 1003.2 manual page.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.