On 25Mar2007 14:49, Paul Smith <phhs80@xxxxxxxxx> wrote: | On 3/25/07, Charles Curley <charlescurley@xxxxxxxxxxxxxxxxx> wrote: | >The dd command is quite reliable. It does exactly what you tell it to | >do, not what you think you told it to do. Had you given it a count of | >sectors to read (calculated to match exactly the size of the ISO), it | >would have read only those sectors. [...] | | The script I use is the following: | | ------------------------------------------- | #!/bin/sh | | blocos=`echo $(( $(ls -l "$1" | awk '{ print $5 }') / 2048 ))` | disksum=`dd if=/dev/dvd bs=2048 count=$blocos | md5sum - "$1"` | | echo "$disksum" | ------------------------------------------- | | So, it does give the bs and count parameters to dd. Notwithstanding, I | get an error with dd. For other DVDs, this very script has worked | fine. Your script is buggy (and needlessly complex). It can round the block count down by one. Try this: blocos=$(ls -l "$1" | awk '{ print ($5+2047) / 2048 }') It is at least arithmetically correct. Whether it changes real world behaviour remains to be seen - the depend on how the contructor of the ISO image works. -- Cameron Simpson <cs@xxxxxxxxxx> DoD#743 http://www.cskk.ezoshosting.com/cs/ Don't part with your illusions. When they are gone, you may still exist, but you have ceased to live. - Mark Twain