LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   md5sum output (https://www.linuxquestions.org/questions/linux-newbie-8/md5sum-output-378020/)

Sjonnie48 10-29-2005 07:12 AM

md5sum output
 
Hello,

For a reason I must check a cdrom containing an iso image. That means there are thousands of files to check. Pretty much to read, so I do the following:

#md5sum -c /mnt/cdrom/md5sum.txt | grep expression

But I don't know which expression to grep, for I only want to see the mismatches.
Who knows what the program prints in case of a mismatch?
My version is 5.2.1

Thanks,

Sjonnie

Rojon 10-29-2005 10:21 AM

Aren't you supposed to run md5sum on the iso? It will then output a long string, you then match the string against the contents of the checksum text file that came with the iso.

For example, recently i downloaded FreeBSD..

$ md5sum 5.4-RELEASE-I386-disc1.iso
2afe65af7e7b994c3ce87cefda27352e

Now check it against the CHECKSUM.MD5 file here..

ftp://ftp.freebsd.org/pub/FreeBSD/re...SO-IMAGES/5.4/

Then again, maybe you are trying to do something i haven't done before, in which case my advice will be no use...lol.

Cheers :)

Sjonnie48 10-29-2005 11:14 AM

Unfortunately this is not possible. Once it has been burned onto a cdrom the iso cannot be read as one file anymore, but there are files and directories.
One of the files is md5sum.txt, and it contains a list of md5sums of each & every file in all directories.
With the shell command "md5sum -c /mnt/cdrom/md5sum.txt" I can check all the files. This prints an "OK" to the terminal for every file it has checked, making it difficult to find a mismatch between thousands of lines.
Therefore I want to use grep to select the mismatches only. But for that I must know exactly which expression md5sum prints.
It's all about a cdrom with ubuntu linux that contains some errors.

Sjonnie

Sciallo 11-28-2005 10:34 AM

Re: md5sum output
 
Quote:

Originally posted by Sjonnie48

#md5sum -c /mnt/cdrom/md5sum.txt | grep expression

But I don't know which expression to grep, for I only want to see the mismatches.
Who knows what the program prints in case of a mismatch?
My version is 5.2.1

Thanks,

Sjonnie [/B]
On my system the only way to get a line for each file is to use -v...
The command
#md5sum -c /mnt/cdrom/md5sum.txt
only returns mismatches, to get "OK" for each file I'd do:
#md5sum -cv /mnt/cdrom/md5sum.txt

Hope this helps


All times are GMT -5. The time now is 12:31 PM.