LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Gdiskdump (https://www.linuxquestions.org/questions/ubuntu-63/gdiskdump-4175443137/)

allanator14 12-27-2012 11:21 AM

Gdiskdump
 
hello,

i created 2 image files for my disks using gdiskdump. i want to compare the 2 image files using terminal. anyone know how i can do this because when i use 'diff' command, it says there is no such directory.

unSpawn 12-28-2012 06:23 AM

Quote:

Originally Posted by allanator14 (Post 4857798)
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".


All times are GMT -5. The time now is 04:44 AM.