LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-18-2010, 05:48 PM   #1
vdz
LQ Newbie
 
Registered: Oct 2009
Posts: 6

Rep: Reputation: 0
MD5SUM With program


Hi All,

As I am asked to create a program that runs MD5SUM as follows:
  1. Run MD5 against a file and generate a checksum
  1. Because there are a lot of files in sequence number say file1, file2, etc. So everytime we run MD5 to check a file say file1 then it generates checksum1.md5, and file2 > checksum2.md5 and so on
I think it is possible but please help/show me where I start or somepoint to start with. I have done a bit of Unix before.

Thank you in advance
 
Old 11-18-2010, 11:19 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,417

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
The cmd is here http://linux.die.net/man/1/md5sum and bash docs here http://rute.2038bug.com/index.html.gz http://tldp.org/LDP/Bash-Beginners-G...tml/index.html http://www.tldp.org/LDP/abs/html/

You'd need code similar to
Code:
for file in $( cat files.lst )
do
    md5sum $file >$file.md5
done
where the files to md5sum are listed one to a line in the file files.lst.
You can use the above links to amend the code to your spec.
 
Old 11-19-2010, 04:24 AM   #3
vdz
LQ Newbie
 
Registered: Oct 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Hi Chris

much appreciated.

I'll give it a go.

Cheers
 
  


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 saurabhpandey39 Linux - Newbie 18 11-13-2010 05:54 AM
Different md5sum no. BW~Merlin Linux - Newbie 1 11-24-2004 05:48 AM
md5sum - then what? wmcase Linux - Software 2 10-05-2004 11:55 AM
My md5sum has no extension. What program do I use to run it? necbrownie Linux - Newbie 3 07-09-2004 01:28 PM
Md5sum ? mikeshn Linux - General 6 07-03-2003 12:09 PM

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

All times are GMT -5. The time now is 08:03 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration