Cmp (Unix)

Cmp (Unix)

cmp is a command line utility for computer systems that use a Unix operating system. It compares two files of any type and writes the results to the standard output. By default, cmp is silent if the files are the same; if they differ, the byte and line number at which the first difference occurred is reported.

witches

cmp may be qualified by the use of the following switches, (the long versions are in brackets):

*-b (--print-bytes) - Print differing bytes.
*-i SKIP (--ignore-initial=SKIP) - Skip the first SKIP bytes of input.
*-i SKIP1:SKIP2 (--ignore-initial=SKIP1:SKIP2) - Skip the first SKIP1 bytes of FILE1 and the first SKIP2 bytes of FILE2.
*-l (--verbose) - Output byte numbers and values of all differing bytes.
*-n LIMIT (--bytes=LIMIT) - Compare at most LIMIT bytes.
*-s (--quiet --silent) - Output nothing; yield exit status only.
*-v (--version) - Output version info.
*--help - Outputs a help file.

Return values

* 0 - files are identical
* 1 - files differ
* 2 - inaccessible or missing argument

ee also

*Comparison of file comparison tools
*List of Unix programs

External links

* [http://www.gnu.org/software/diffutils/manual/html_node/Invoking-cmp.html "Comparing and Merging Files": Invoking cmp] The section of the manual of GNU cmp in the diffutils free manual.


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • cmp (Unix) — cmp is a command line utility for computer systems that use Unix or a Unix like operating system. It compares two files of any type and writes the results to the standard output. By default, cmp is silent if the files are the same; if they differ …   Wikipedia

  • CMP — can be an acronym or abbreviation for: Contents 1 Medicine 2 Military and firearms 3 Science and technology 3.1 Computing …   Wikipedia

  • Unix — (registrado oficialmente como UNIX®) es un sistema operativo portable, multitarea y multiusuario; desarrollado, en principio, en 1969 por un grupo de empleados de los laboratorios Bell de AT T, entre los que figuran Ken Thompson, Dennis Ritchie y …   Wikipedia Español

  • cmp — cmp  сравнивает два файла, и если они различаются, сообщает о первом байте и строке, где было обнаружено различие. Входит, например, в пакет GNU diffutils. Синтаксис команды Формат этой команды следующий: cmp OPTIONS... FROM FILE [TO FILE]… …   Википедия

  • Unix — (officially trademarked as UNIX, sometimes also written as Unix with small caps) is a computer operating system originally developed in 1969 by a group of AT T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Douglas McIlroy, and… …   Wikipedia

  • Cmp — cmp  сравнивает два файла, и если они различаются, сообщает о первом байте и строке, где было обнаружено различие. Входит, например, в пакет GNU diffutils. Синтаксис команды Формат этой команды следующий: cmp OPTIONS... FROM FILE [TO FILE]… …   Википедия

  • UNIX — Генеалогическое древо UNIX систем UNIX (читается юникс) семейство переносимых, многозадачных и многопользовательских …   Википедия

  • UNIX — [[t]ˈyu nɪks[/t]] cmp trm a multiuser, multitasking computer operating system …   From formal English to slang

  • date (Unix) — Unix date command The Unix date command displays the time and date. The super user can use it to set the system clock. Contents 1 Usage 2 Formatting …   Wikipedia

  • List of Unix utilities — This is a list of UNIX utilities as specified by IEEE Std 1003.1 2008, which is part of the Single UNIX Specification (SUS). These utilities can be found on UNIX Operating systems and most UNIX like operating systems. List IEEE Std 1003.1 2008… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”