GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing ss64.com — cmp Man Page - Linux cmpCompare two files, and if they differ, tells the first byte and
line number where they differ. Syntax
cmp options... FromFile [ToFile]
Options
Multiple single letter options (unless they take an argument) can be combined into
a single command line word: so '-cl' is equivalent to -c -l.
-c
Print the differing characters. Display control characters as a
'^' followed by a letter of the alphabet and precede characters
that have the high bit set with 'M-' (which stands for "meta").
--ignore-initial=BYTES
Ignore any differences in the first BYTES bytes of the input files.
Treat files with fewer than BYTES bytes as if they are empty.
-l
Print the (decimal) offsets and (octal) values of all differing bytes.
--print-chars
Print the differing characters. Display control characters as a
'^' followed by a letter of the alphabet and precede characters
that have the high bit set with 'M-' (which stands for "meta").
--quiet
-s
--silent
Do not print anything; only return an exit status indicating
whether the files differ.
--verbose
Print the (decimal) offsets and (octal) values of all differing
bytes.
-v
--version
Output the version number of 'cmp'.
The file name '-' is always the standard input. 'cmp' also uses the
standard input if one file name is omitted.
An exit status of 0 means no differences were found, 1 means some
differences were found, and 2 means trouble.
Examples$ cmp tnsnames.ora tnsnames.old 'cmp' reports the differences between two files character by character, instead of line by line. As a result, it is more useful than 'diff' for comparing binary files. For text files, 'cmp' is useful mainly when you want to know only whether two files are identical. "First rate people hire other first rate people. Second rate people hire third rate people. Third rate people hire fifth rate people” ~ André Weil Related Linux commandscomm - Compare two sorted files line by line. Copyright © 1999-2026 SS64.com
Some rights reserved |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |