Link to home
Start Free TrialLog in
Avatar of PhilMacavity
PhilMacavityFlag for Jersey

asked on

Linux md5sum script

Hello,

I would like a script to achieve the following:

(Example locations only)
/tmp/sample-files contains the following files: md5-1, md5-2, md5-3 etc

1. Run the script against the target directory /tmp/sample-files
2. Create a file that contains a list of the files to be checksummed (md5-sum-src)
3. Run the md5sum command against the above file and output the results to another file (md5-sum-results).


Thanks,

Phil
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Why do you need an intermediate file?

Just run

md5sum /tmp/sample-files/* > md5-sum-results

That's all.

wmp
Avatar of PhilMacavity

ASKER

Hi Wmp,

Thaks for the comment.

md5sum /tmp/sample-files/* > md5-sum-results would work for my initial plans . Instead of, having to run the md5sum command multiple times against the target directories, i was planning to run it once against a src file containing a list of the files to be checksummed.

Cheers,

Phil.
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi wmp,

Thanks for the suggestions. These should be enough for me to achieve what i need.

Cheers,

Phil