checking a burned CD against an ISO

Chris F.A. Johnson cfaj-uVmiyxGBW52XDw4h08c5KA at public.gmane.org
Wed May 23 20:52:57 UTC 2007


On Wed, 23 May 2007, Lennart Sorensen wrote:

> On Wed, May 23, 2007 at 12:26:18AM -0400, Chris F.A. Johnson wrote:
>>> FILESIZE=$(stat -c%s "$ISO_FILENAME")
>>> DISK_MD5=`dd if=$DEVICE | head -c $FILESIZE | md5sum`
>>
>>     No need for more than one external command:
>>
>> DISK_MD5=$( md5sum "$DEVICE" )
>
> Unless the linux kernel has somehow recently got a clue about reading
> optical media without trying to read past the end of the device, then
> that 'head' command is probably quite useful.

    I've been using 'md5sum "$DEVICE"' without any problem for years.

-- 
    Chris F.A. Johnson                      <http://cfaj.freeshell.org>
    ========= Do not reply to the From: address; use Reply-To: ========
    Author:
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list