Verify a CD-ROM
I want to test a CD-ROM to ensure all files are readable.
So far, I am using the command: find /mnt/cdrom -print -exec grep "String Which Will Never Match" {} \; which is pretty clumsy and checks the contents of every file to see if this goofy string is contained inside. Anybody have a more elegant way to read each file and make sure they are readable? I don't have a good MD5 checksum to compare against. |
you could try something like that :
NOTE : i havent tested it as i am using windows now at work :cry: #!/bin/bash count=0 for file in "/mnt/cdrom" if [ -r $file ];then # True if FILE exists and is readable. count=$((count+1)) fi echo "Files readable : $count" |
All times are GMT -5. The time now is 09:56 AM. |