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