LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-21-2013, 12:02 AM   #1
junior-s
Member
 
Registered: Apr 2013
Location: Brazil
Distribution: Arch Linux
Posts: 137

Rep: Reputation: Disabled
md5sum - Really?


I'm checking a DVD for errors and it's output is very long (it's a debian DVD), so I can't scroll back up to see if any error was found. The command I use is
Code:
md5sum -c md5sum.txt
I wonder if any error will be reported at the end of the check?
 
Old 08-21-2013, 12:07 AM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 3,876
Blog Entries: 1

Rep: Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997
Quote:
Originally Posted by junior-s View Post
I'm checking a DVD for errors and it's output is very long (it's a debian DVD), so I can't scroll back up to see if any error was found. The command I use is
Code:
md5sum -c md5sum.txt
I wonder if any error will be reported at the end of the check?
The -c makes it run an md5sum for every file on the DVD... potentially long list.

Do it on the DVD or iso without the -c to get an md5 check of the DVD itself.

Last edited by astrogeek; 08-21-2013 at 12:10 AM. Reason: Rethinking the post...
 
1 members found this post helpful.
Old 08-21-2013, 12:19 AM   #3
junior-s
Member
 
Registered: Apr 2013
Location: Brazil
Distribution: Arch Linux
Posts: 137

Original Poster
Rep: Reputation: Disabled
I really want to make sure all files are OK since I'll be installing this system. I have no problems with the long list it's just that I don't know if any error will be displayed at the end of it, because the list is so long I can't even get to the top so look for errors.

EDIT:

Nevermind, somehow it fit in the Terminal =)
The output didn't even fit here
Code:
The text that you have entered is too long (314985 characters). Please shorten it to 30000 characters long.

Last edited by junior-s; 08-21-2013 at 12:30 AM.
 
Old 08-21-2013, 12:34 AM   #4
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 3,876
Blog Entries: 1

Rep: Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997
Quote:
Originally Posted by junior-s View Post
I really want to make sure all files are OK since I'll be installing this system. I have no problems with the long list it's just that I don't know if any error will be displayed at the end of it, because the list is so long I can't even get to the top so look for errors.

EDIT:

Nevermind, somehow it fit in the Terminal =)
The output didn't even fit here
Code:
The text that you have entered is too long (314985 characters). Please shorten it to 30000 characters long.
Then you could redirect it to a file, or better yet just catch anything that fails and throw away the rest, like this:
Code:
md5sum -c md5sum.txt 2>&1 |grep 'FAIL' |tee failedsums.txt
That will filter only those that fail, write them to the screen and save a copy in the file failedsums.txt

Last edited by astrogeek; 08-21-2013 at 12:36 AM.
 
1 members found this post helpful.
Old 08-21-2013, 12:37 AM   #5
junior-s
Member
 
Registered: Apr 2013
Location: Brazil
Distribution: Arch Linux
Posts: 137

Original Poster
Rep: Reputation: Disabled
Thanks! Much appreciated!
 
Old 08-21-2013, 12:39 AM   #6
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 3,876
Blog Entries: 1

Rep: Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997
Quote:
Originally Posted by junior-s View Post
Thanks! Much appreciated!
You are welcome! Good luck!
 
1 members found this post helpful.
Old 08-21-2013, 09:20 AM   #7
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 2,957

Rep: Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267
The md5sum utility has a perfectly good "--quiet" option to suppress the "OK" messages for all the successful checks and leave only the errors, though you might find yourself wishing for some sort of progress mark for the long job of checking all the files on a DVD.
 
Old 08-21-2013, 09:51 AM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
Regardless if it is only one file that is damaged, the md5sum of the whole DVD will report that error. So it is rather pointless to check all files on the DVD, when the md5sum of the whole DVD is sufficient to detect a damaged disc.
 
Old 08-21-2013, 01:36 PM   #9
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 2,957

Rep: Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267
A complication with checking the whole DVD is that the DVD is padded with zeros at the end, and those change the MD5 hash. You have to find the size of the of the original image that was burned to the DVD and do the md5sum check over just that many bytes. Finding that size can be difficult if you don't have the original image, which might or might not be a pure ISO9660 image for which you can use the isosize command to find the original size.
 
Old 08-21-2013, 02:16 PM   #10
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,087
Blog Entries: 10

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
I didn't realize that a debian distribution went through the effort to create an md5sum file describing all files on the DVD. junior-s, did you create that file? As other's have said, check the ISO file and leave it at that.
 
Old 08-21-2013, 02:50 PM   #11
junior-s
Member
 
Registered: Apr 2013
Location: Brazil
Distribution: Arch Linux
Posts: 137

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
I didn't realize that a debian distribution went through the effort to create an md5sum file describing all files on the DVD. junior-s, did you create that file? As other's have said, check the ISO file and leave it at that.
No, Debian and it's forks make the md5sum.txt file so what you can check file by file.
I don't bother this method, takes less than 10 minutes =]
 
Old 08-27-2013, 08:49 AM   #12
dt64
Member
 
Registered: Sep 2012
Distribution: RHEL5/6, CentOS5/6
Posts: 216

Rep: Reputation: 38
Quote:
Originally Posted by junior-s View Post
... so I can't scroll back up to see if any error was found
You should be able to scroll back in such situations using <SHIFT> + <PageUp>.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 tasnim Programming 1 10-28-2007 04:12 AM
md5sum dana-kim Slackware 1 01-09-2006 08:49 AM
md5sum - then what? wmcase Linux - Software 2 10-05-2004 11:55 AM
Help with MD5SUM Smokeball Linux - Newbie 3 08-30-2003 11:45 PM
Something is going on with these MD5sum's... X11 Linux - Security 2 03-10-2002 09:09 PM


All times are GMT -5. The time now is 03:11 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration