Files
oldlinux-files/Minix/2.0.0/wwwman/man1/cmp.1.html
2024-02-19 00:21:39 -05:00

74 lines
1.2 KiB
HTML

<HTML>
<HEAD>
<TITLE>cmp(1)</TITLE>
</HEAD>
<BODY>
<H1>cmp(1)</H1>
<HR>
<PRE>
</PRE>
<H2>NAME</H2><PRE>
cmp - compare two files
</PRE>
<H2>SYNOPSIS</H2><PRE>
<STRONG>cmp</STRONG> [<STRONG>-ls</STRONG>] <EM>file1</EM> <EM>file2</EM>
</PRE>
<H2>OPTIONS</H2><PRE>
<STRONG>-l</STRONG> Loud mode. Print bytes that differ (in octal)
<STRONG>-s</STRONG> Silent mode. Print nothing, just return exit status
</PRE>
<H2>EXAMPLES</H2><PRE>
<STRONG>cmp</STRONG> <STRONG>file1</STRONG> <STRONG>file2</STRONG> # Tell whether the files are the same
<STRONG>cmp</STRONG> <STRONG>-l</STRONG> <STRONG>file1</STRONG> <STRONG>file2</STRONG> # Print all corresponding bytes that differ
</PRE>
<H2>DESCRIPTION</H2><PRE>
Two files are compared. If they are identical, exit status 0 is
returned. If they differ, exit status 1 is returned. If the files
cannot be opened, exit status 2 is returned. If one of the file
arguments is -, then <EM>stdin</EM> is compared to the other file.
</PRE>
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="../man1/comm.1.html">comm(1)</A></STRONG>, <STRONG><A HREF="../man1/diff.1.html">diff(1)</A></STRONG>.
</PRE>
</BODY>
</HTML>