I want to compare the content of two disk images. (For example two disk images with gutsy n edgy) Is there a straight forward command for it in Unix?
To compare disk images byte-for-byte and list all the differing bytes, you can run
cmp -l /path/to/first.img /path/to/second.img
This will compare everything, including any unoccupied space. If these are filesystem images and you want to do a file-against-file comparison, you need to mount them, then use a file comparison tool such as diff or rsync.
Here's a command that will compare /dev/sda1 to /dev/sdb1, with a GUI to show progress; partitions tend to be big inputs so it's nice to know how long you need to wait for completion. The command is for a particular 6 terabyte disk, the progress data will only be as good as your size estimate.
gprog --size-estimate 6001173463040 < /dev/sda1 | cmp - /dev/sdb1
gprog is available from http://stromberg.dnsalias.org/~strombrg/gprog/ I'm the author.
You could conceivably do something similar with pv, though I'm not sure what it'd do with any output from cmp.