H I O X INDIA
LINUX Commands
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Templates 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)
Español Français 中文 Deutsch
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

LINUX / UNIX cmd
Introduction
Commands in A
Commands in B
Commands in C
Commands in D
Commands in E
Commands in F
Commands in G
Commands in H
Commands in I
Commands in J
Commands in K
Commands in L
Commands in M
Commands in N
Commands in P
Commands in R
Commands in S
Commands in T
Commands in U
Commands in W
Commands in Y
More about Linux
Feedback




cmp Linux Commands


Topic

What is Linux cmp Command?




Explanation

cmp COMMAND:
     cmp linux command compares two files and tells you which line numbers are different.

SYNTAX:
  The Syntax is
     cmp [options..] file1 file2

OPTIONS:
     
- c Output differing bytes as characters.
- l Print the byte number (decimal) and the differing byte values (octal) for each difference.
- s Prints nothing for differing files, return exit status only.



EXAMPLE:
     
  1. Compare two files:
    cmp file1 file2

    The above cmp command compares file1.php with file2.php and results as follows.

    file1.php file2.php differ: byte 35, line 3

  2. Compare two files output differing bytes as characters:
    cmp -c file1.php file2.php

    The above cmp command compares file1.php with file2.php and results as follows.

    file1.php file2.php differ: byte 35, line 3 is 151 i 15





        Find LINUX Commands... Hope you enjoy this tutorial. We welcome your Valuable feedbacks or suggestions on this LINUX / UNIX cmd reference. This is a copyright content.


privacy policy     license     sitemap
© 2004-2009 HIOX INDIA - hioxindia.com

Other Links