LinuxQuestions.org
Register a domain and help support LQ
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-19-2011, 11:35 AM   #1
chris_carr
Member
 
Registered: Oct 2011
Location: Houston Tx
Distribution: RHEL 6
Posts: 57

Rep: Reputation: 0
Talking md5sum -c errros


Ok, I have never posted on a forum before because I have always been able to figure out my issue before it came to that. But now I'm dead in the water with this program I'm trying to write.

I was asked by a co-worker to write a script that would check the hash keys of database files in a given directory. Before I write any script I run the commands in a term to ensure they will work. I was able to run
md5sum "directory" >> md5sum.txt. This gave me the all the hash keys for the files and put them in their own folder. I did the same for the files I was trying to compare them to.
md5sum "directory" >> md5sumb.txt

This worked as well, but when I try and run

md5sum -c md5sum.txt md5sumb.txt all I get are errors saying either the
"filename: No such file or directory".
"FAILED open or read"

I have been banging my head on the wall and trolling forums for almost a week now and I can not find any help with my situation. Every forum I pull up is about people only using md5sum for .iso files or cd's. Is this just not the command I should be using to compare txt files? Or am I just retarded and not seeing what I'm doing wrong. I have never been able to get the -c flag to work....HELP!!!!
 
Old 10-19-2011, 07:02 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
After you saved the hashes for files in a directory (I prefer 'md5deep -r /some/path > /path/to/md5sum.txt') you should be able to verify them hashes with 'md5sum -c /path/to/md5sum.txt' NP. Unless you actually meant you wanted to compare file contents ('man diff') that is...
 
1 members found this post helpful.
Old 10-20-2011, 07:30 AM   #3
chris_carr
Member
 
Registered: Oct 2011
Location: Houston Tx
Distribution: RHEL 6
Posts: 57

Original Poster
Rep: Reputation: 0
Hello UnSpawn,


Thank you so much I actually figured it out yesterday before I left work, but you are right it was because inside the md5sum.txt file I did not have the path to the database files. Once I threw those in there I was able to use the -c. But thank you anyway. : )
 
  


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
Ubuntu-server spitting odd perl errros, suggestions sir-lancealot Linux - Server 1 05-07-2009 03:08 AM
Kernel Errros Present message - concern? wjstarck Fedora 1 06-23-2006 04:31 PM
Different md5sum no. BW~Merlin Linux - Newbie 1 11-24-2004 05:48 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 07:15 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