LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-29-2005, 07:12 AM   #1
Sjonnie48
Member
 
Registered: Jun 2005
Location: Earth
Distribution: Ubuntu10.04
Posts: 308

Rep: Reputation: 43
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
 
Old 10-29-2005, 10:21 AM   #2
Rojon
Member
 
Registered: Aug 2005
Location: UK
Distribution: Slackware
Posts: 41

Rep: Reputation: 15
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
 
Old 10-29-2005, 11:14 AM   #3
Sjonnie48
Member
 
Registered: Jun 2005
Location: Earth
Distribution: Ubuntu10.04
Posts: 308

Original Poster
Rep: Reputation: 43
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
 
Old 11-28-2005, 10:34 AM   #4
Sciallo
LQ Newbie
 
Registered: May 2003
Posts: 13

Rep: Reputation: 0
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MD5SUM How to use it Baz Linux - Newbie 10 11-12-2013 10:39 AM
Md5sum Brad52 Mandriva 1 05-20-2005 04:47 PM
md5sum - then what? wmcase Linux - Software 2 10-05-2004 10:55 AM
Via AC'97 5.1 Optical Output or Audigy 4.1 Output Nza Fedora 3 06-01-2004 07:49 AM
the sound gives output when using mic but no output when run a music file medo Debian 0 04-19-2004 07:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration