1 .\" You may copy, distribute and modify under the terms of the LDP General
2 .\" Public License as specified in the LICENSE file that comes with the
3 .\" gnumaniak distribution
5 .\" The author kindly requests that no comments regarding the "better"
6 .\" suitability or up-to-date notices of any info documentation alternative
7 .\" is added without contacting him first.
9 .\" (C) 2002 Ragnar Hojland Espinosa <ragnar@ragnar-hojland.com>
13 .\" man pages are NOT obsolete!
14 .\" <ragnar@ragnar-hojland.com>
16 .\" Japanese Version Copyright (c) 1999-2003 Yuichi SATO
17 .\" all rights reserved.
18 .\" Translated Sat Sep 25 16:34:52 JST 1999
19 .\" by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
20 .\" Updated & Modified Sun Feb 16 12:15:36 JST 2003
21 .\" by Yuichi SATO <ysato444@yahoo.co.jp>
23 .TH CMP 1 "October 2002" "GNU diff Utilities 2.8.1"
25 .\"O \fBcmp\fP \- compare two files byte by byte
27 \fBcmp\fP \- 2 ¤Ä¤Î¥Õ¥¡¥¤¥ë¤ò 1 ¥Ð¥¤¥È¤º¤ÄÈæ³Ó¤¹¤ë
30 .BR "cmp " [ \-bls "] [" "\-i " \fIBYTES\fR[:\fIBYTES2\fP]]
31 .RB [ "\-n " \fIBYTES\fR]
32 .RB [ \-\-bytes\ \fIBYTES\fR]
33 .RB [ \-\-ignore\-initial= \fIBYTES\fR[:\fIBYTES2\fP]]
34 .RB [ \-\-print\-bytes "] [" \-\-quiet "] [" \-\-silent "] [" \-\-verbose ]
36 .BR "cmp " [ \-v "] [" \-\-help "] [" \-\-version ]
39 .\"O compares two files of any type, byte by byte, and writes the results to the
40 .\"O standard output. At most one of these three file names may be
44 .\"O to read the standard input for that file.
47 ¤Ï 2 ¤Ä¤Î¥Õ¥¡¥¤¥ë¤òÈæ³Ó¤¹¤ë¡£
48 ¥Õ¥¡¥¤¥ë¤Ï¤É¤ó¤Ê¼ïÎà¤Î¤â¤Î¤Ç¤â¤è¤¯¡¢Èæ³Ó¤Ï 1 ¥Ð¥¤¥È¤º¤Ä¹Ô¤ï¤ì¤ë¡£
49 ·ë²Ì¤Ïɸ½à½ÐÎϤ˽ñ¤½Ð¤µ¤ì¤ë¡£
50 2 ¤Ä¤Î¥Õ¥¡¥¤¥ë̾¤Î¤¦¤Á¤Î 1 ¤Ä¤¬
54 ¤Ï¤½¤Î¥Õ¥¡¥¤¥ë¤ÎÂå¤ï¤ê¤Ëɸ½àÆþÎϤò»È¤¦¡£
56 .\"O By default, \fBcmp\fP is silent if the files are the same; if they differ,
57 .\"O the byte and line number at which the first difference occurred is reported.
58 .\"O Bytes and lines are numbered beginning with one.
59 ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢2 ¤Ä¤Î¥Õ¥¡¥¤¥ë¤ÎÆâÍƤ¬Æ±¤¸¾ì¹ç
60 \fBcmp\fP ¤Ï²¿¤â½ÐÎϤ·¤Ê¤¤¡£
61 2 ¤Ä¤Î¥Õ¥¡¥¤¥ë¤ÎÆâÍƤ¬°Û¤Ê¤ë¾ì¹ç¡¢
62 ºÇ½é¤Ëº¹°Û¤¬À¸¤¸¤¿¥Ð¥¤¥È°ÌÃ֤ȹÔÈÖ¹æ¤òɽ¼¨¤¹¤ë¡£
63 ¥Ð¥¤¥È°ÌÃ֤ȹÔÈÖ¹æ¤Ï 1 ¤«¤é»Ï¤Þ¤ë¡£
67 .B "\-b, \-\-print\-bytes"
68 .\"O Print the differing bytes. Display control characters as a `^' followed by
69 .\"O a letter and precede the bytes that have the high bit set with `M-' (which
70 .\"O stands for meta).
71 °ã¤¤¤Î¤¢¤ë¥Ð¥¤¥È¤òɽ¼¨¤¹¤ë¡£
72 À©¸æʸ»ú¤Ï `^' ¤È¤½¤ì¤Ë³¤¯Ê¸»ú¤Çɽ¼¨¤·¡¢
73 ¥Ï¥¤¥Ó¥Ã¥È¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë (ÌõÃí: 0x80 ¤«¤é 0xFF ¤Þ¤Ç¤Î) ¥Ð¥¤¥È¤Ï
74 (¥á¥¿¤ò¼¨¤¹) `M-' ¤òÀèƬ¤Ë¤Ä¤±¤Æɽ¼¨¤¹¤ë¡£
76 .BI "\-i " BYTES\fR[:\fIBYTES2\fR]] ", \-\-ignore\-initial=" BYTES\fR[:\fIBYTES2\fR]]
77 .\"O Ignore any differences in the the first \fIBYTES\fP bytes of
79 .\"O Treat files with fewer than \fIBYTES\fP bytes as if they are empty. If
80 .\"O \fIBYTES2\fR is given, it also skips \fIBYTES2\fR from the second file
81 .\"O before comparing.
82 ÆþÎÏ¥Õ¥¡¥¤¥ë¤ÎºÇ½é¤Î \fIBYTES\fP ¥Ð¥¤¥È¤Þ¤Ç¤Ë¤¢¤ë°ã¤¤¤ò̵»ë¤¹¤ë¡£
83 \fIBYTES\fP ¥Ð¥¤¥È¤è¤ê¾®¤µ¤¤¥µ¥¤¥º¤Î¥Õ¥¡¥¤¥ë¤Ï¶õ¤Î¥Õ¥¡¥¤¥ë¤È¤·¤Æ°·¤ï¤ì¤ë¡£
84 \fIBYTES2\fR ¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¢
85 Èæ³Ó¤¹¤ëÁ°¤Ë 2 ¤ÄÌܤΥե¡¥¤¥ë¤Î \fIBYTES2\fR ¥Ð¥¤¥È¤â¥¹¥¥Ã¥×¤¹¤ë¡£
88 .\"O Print the (decimal) offsets and (octal) values of all differing bytes.
89 °ã¤¤¤Î¤¢¤ëÁ´¤Æ¤Î¥Ð¥¤¥È¤Ë¤Ä¤¤¤Æ¡¢
90 ¥ª¥Õ¥»¥Ã¥È¹Ô (10 ¿Ê¿ô) ¤È¥Ð¥¤¥È¿ô (8 ¿Ê¿ô) ¤òɽ¼¨¤¹¤ë¡£
92 .BI "\-n " BYTES ", \-\-bytes=" BYTES
93 .\"O Only compare up to \fIBYTES\fR.
94 \fIBYTES\fR ¥Ð¥¤¥ÈÌܤޤǤÀ¤±¤òÈæ³Ó¤¹¤ë¡£
96 .B "\-s, \-\-quiet, \-\-silent"
97 .\"O Do not print anything; only return an exit status indicating
98 .\"O whether the files differ.
100 2 ¤Ä¤Î¥Õ¥¡¥¤¥ë¤¬°Û¤Ê¤ë¤«¤ò¼¨¤¹½ªÎ»¾õÂ֤ΤߤòÊÖ¤¹¡£
103 .\"O Print a usage message on standard output and exit successfully.
104 »ÈÍÑË¡¤òɸ½à½ÐÎϤËɽ¼¨¤·¤Æ½ªÎ»¤¹¤ë¡£
106 .B "\-v, \-\-version"
107 .\"O Print version information on standard output then exit successfully.
108 ¥Ð¡¼¥¸¥ç¥ó¾ðÊó¤òɸ½à½ÐÎϤËɽ¼¨¤·¤Æ½ªÎ»¤¹¤ë¡£
111 .\"O exits with one of the following values:
114 ¤Ï¼¡¤Î¤¤¤º¤ì¤«¤Î¾õÂÖ¤òÊÖ¤·¤Æ½ªÎ»¤¹¤ë¡§
117 .\"O No differences were found.
118 2 ¤Ä¤Î¥Õ¥¡¥¤¥ë¤Ë°ã¤¤¤Ï¤Ê¤¤¡£
121 .\"O Some differences were found. If one file is shorter than the the other and
122 .\"O the \fB\-\-verbose\fP option has been specified, \fBcmp\fP will report that
123 .\"O EOF has been reached on the shorter file.
124 2 ¤Ä¤Î¥Õ¥¡¥¤¥ë¤Ë°ã¤¤¤¬¤¢¤ë¡£
125 °ìÊý¤Î¥Õ¥¡¥¤¥ë¤¬Â¾Êý¤Î¥Õ¥¡¥¤¥ë¤è¤ê¾®¤µ¤¯¡¢
126 \fB\-\-verbose\fP ¥ª¥×¥·¥ç¥ó¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢
127 \fBcmp\fP ¤Ïû¤¤Êý¤Î¥Õ¥¡¥¤¥ë¤Î½ªÃ¼ EOF ¤Ë㤷¤¿¤³¤È¤òɽ¼¨¤¹¤ë¡£
130 .\"O Some error has occurred.
134 .BR diff "(1), " diff3 (1)
137 .\"O Report bugs to bug-gnu-utils@gnu.org.
138 .\"O Page updated by Ragnar Hojland Espinosa <ragnar@ragnar-hojland.com>
139 ¥×¥í¥°¥é¥à¤Î¥Ð¥°¤Ë¤Ä¤¤¤Æ¤Ï bug-gnu-utils@gnu.org ¤ØÊó¹ð¤·¤Æ¤¯¤À¤µ¤¤¡£
140 ¤³¤Î¥Ú¡¼¥¸¤Ï Ragnar Hojland Espinosa
141 <ragnar@ragnar-hojland.com> ¤Ë¤è¤Ã¤Æ¹¹¿·¤µ¤ì¤¿¡£