cmp
FilesFundamentals In simulator In real LinuxCompare two files byte by byte
Name: cmp = compare
You can practise it right away in the simulator, and use it in real Linux mode too.
Description
cmp compares two files byte by byte and reports where the first difference is (byte and line). It suits binary files; for text, diff is more informative. -s prints nothing and only sets the exit status.
Syntax
cmp [OPTION]... FILE1 FILE2Common options
| -s / --quiet / --silent | Silent; only the exit status tells |
| -l / --verbose | List every differing byte |
| -b / --print-bytes | Also show the differing bytes as characters |
| -n / --bytes LIMIT | Compare at most LIMIT bytes |
| -i / --ignore-initial SKIP | Skip the first SKIP bytes |