|
|
Sponsored Links
|
Maxabout.com > Tips
Check Cd ScriptAdded on:8/31/2008 9:12:39 PM In Linux Tips Rated by 1 users
Imagine, you did the checksum on the ISO and you burned the CD, still you want to double check the integrity of the files on the CD . . . .
- Here is a little script that will do the checksum on your CDs. You do need the original checksum to compare with the outcome of this script.
CODE $ vi checkcd "i" ( to put vi in insertmode ) And paste the following lines: QUOTE (Text @ Script) #!/bin/sh #checkcd device=$1 blocksize=`isoinfo -d -i $device | grep "^Logical block size is:" | cut -d " " -f 5` if test "$blocksize" = ""; then echo catdevice FATAL ERROR: Blank blocksize >&2 exit fi blockcount=`isoinfo -d -i $device | grep "^Volume size is:" | cut -d " " -f 4` if test "$blockcount" = ""; then echo catdevice FATAL ERROR: Blank blockcount >&2 exit fi command="dd if=$device bs=$blocksize count=$blockcount conv=notrunc,noerror" echo "$command" >&2 $command < Esc > ( put vi in command mode ) "ZZ" ( save the file ) CODE $ su < password > # chmod 755 checkcd CODE # ./checkcd /dev/cdrom | md5sum
- This should give you the md5sum after a minute. Check it with the original and then you´re sure the CD is 100% perfect.
|
Sponsored Links
Tools
Bookmark/Discuss
|
|
|