Originally Posted by allanator14
i want to compare the 2 image files using terminal.
The simplest but most crude way would be to compare the MD5 or SHA1 hash of both files. If you want to know what image contents are different then you could loop mount them ('man losetup') and then compare recursively. FWIW while you could use 'diff' with "--brief" and other options, if your image contents contain a huge mix of human readable files and binary data, it could be more efficient to first use md5deep
on the "original" image contents ('md5deep -r /mountpoint 2>/dev/null >/path/to/hashes.md5') and then compare it with the other mount point ('md5deep -r -m /path/to/hashes.md5 /othermountpoint 2>&1>/path/to/hashes.checked') and then pick items to investigate from "/path/to/hashes.checked".