Linux Tutorials: Comparing file commands
7 Aug '16
0 Shares

Linux Tutorials: Comparing file commands

The following are the example of comparing file commands.

1. Example of diff command:

diff: show differences between two files
Example:

user> diff example1.txt example2.txt

(diff: show differences between two files.)

2. Example of cmp command:

cmp: compare two files byte by byte
Example:

user> cmp example1.txt example2.txt

(cmp: compare two files byte by byte.)

3. Example of comm command:

comm: compare two files line by line
Example:

user> comm example1.txt example2.txt

(comm: compare two files line by line.)

4. Example of md5sum command:

md5sum: create a md5 checksum number
Example:

user> md5sum  example1.txt
(output:  g7thgu5orh1fjt8kelc2os95nd57jf8r  example1.txt.)

5. Example of cksum command:

cksum: create a crc number
Example:

user> cksum  example2.txt
(output:  6878731048  16  example2.txt.)

About arun

Related Posts

Leave a Reply

*