LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 12-27-2012, 11:21 AM   #1
allanator14
LQ Newbie
 
Registered: Dec 2012
Posts: 1

Rep: Reputation: Disabled
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.
 
Old 12-28-2012, 06:23 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,984
Blog Entries: 54

Rep: Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742
Quote:
Originally Posted by allanator14 View Post
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".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 01:05 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration