Linux command compare files

Source: Internet
Author: User

Cmp

[ function Description ]

Compare files

#cmp can compare any type of file and display the first different line number and byte number of a file on a standard output device, starting with 1 , but typically used to compare text files

[ syntax Format ]

cmp[ parameter [ file 1][ file 2][skip1][skip2]

[ option parameter ]

Parameters

Description

-L

Displays the byte number and number of bytes for each of the different points in the comparison file, shown in decimal and the latter in octal

-S

Exit without displaying an error message

Comm

[ function Description ]

Compare files

#comm can compare two sorted files on a row-by-line basis and output results to the screen based on the user's specified options or redirect to a file for comparison of ordered files

[ syntax Format ]

comm[ parameter ] file 1 file 2 [>|>> file name ]

[ option parameter ]

Parameters

Description

-1

Suppresses the display of line 1, which appears in file 1 without displaying

-2

Suppresses the display of Line 2, which appears in file 1 without displaying

-3

Suppresses the display of line 3 , which appears both in file 1 and in file 2 without displaying

Just do a summary if it is wrong, please Daniel criticism advice.

Sincerely salute

Copyright notice

The contents of this summary are all excerpt from "Linux Command complete technical treasure" Zhang Dong

Linux command compare files

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.