comp
Syntax
comp[-b]
file1
file2
Description
Compares the contents of two files on a byte for byte basis.
Options
-b
Displays one screen at a time.
file1
Specifies the first file name. Directory names or wildcards are not permitted.
file2
Specifies the second file name. Directory names or wildcards are not permitted.
Usage
This command displays up to 10 differences between the two files. For each difference, up to 32 bytes from the location where the difference starts are dumped. The UEFI Shell exits immediately if the lengths of the compared files are different.
Examples
To compare two files with different lengths:
fs0:\> comp bios.inf legacy.inf
Compare fs0:\bios.inf to fs0:\legacy.inf
Difference #1: File sizes mismatch
[difference(s) encountered]
To compare two files with the same contents:
fs0:\> comp bios.inf rafter.inf
Compare fs0:\bios.inf to fs0:\rafter.inf
[no difference encountered]
To compare two files with the same length but different contents:
fs0:\> comp bios.inf bios2.inf
Compare fs0:\bios.inf to fs0:\bios2.inf
Difference #1:
File1: fs0:\bios.inf
00000000: 5F *_*
File2: fs0:\bios2.inf
00000000: 33 *3*
Difference #2:
File1: fs0:\bios.inf
0000000C: 00 00 00 00 *....*
File2: fs0:\bios2.inf
0000000C: 25 32 03 03 *%2..*
[difference(s) encountered]