Script to check MD5SUM on file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script to check MD5SUM on file
# 1  
Old 10-16-2010
Script to check MD5SUM of file

Hi,

I currently have a shell script that takes an RPM and scp's it to a set of remote servers and installs it.

What I would like to be able to do is make the script get the md5sum of the RPM locally (so get the md5sum of the rpm from where im running the script) and then scp the rpm to the remote server, and then check the md5sum again, to ensure they match.

If the md5sums match, then continue, if they dont, cancel.

Anyone offer any pointers on how I can do this? Or an example script which I can ammend?

Thank you,

Tom

Last edited by tb1986; 10-16-2010 at 09:02 PM.. Reason: typo
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[md5sum] script

I am getting No such file or directory if my variable contains white spaces... Is there a way to fix this? This works x="1.md5" md5sum -c "$x" This, does not x="23\ 5\ 6\ 7\ 8\ 9\ 10.md5" md5sum -c "$x" md5sum: '23\ 5\ 6\ 7\ 8\ 9\ 10.md5': No such file or directory How do I fix... (1 Reply)
Discussion started by: soichiro
1 Replies

2. Shell Programming and Scripting

Making a script to copy files not seen before (using md5sum)

Hello, I would like to make a script that searches through a SRC folder and copies only files it's never seen before to a DEST folder. SRC = /user/.phonesync/photos-backup DST = /usr/.phonesync/photos-new So basically, I'd start with a: md5sum /user/.phonesync/photos-backup/* >... (29 Replies)
Discussion started by: nbsparks
29 Replies

3. Shell Programming and Scripting

Md5sum script

Hello, I need to download multiple files from an FTP server but occasionally they arrive in error so I need to perform an integrity check. I've been attempting to write a bash script that does the following: Downloads all files including those in sub directories Perform md5sum using... (4 Replies)
Discussion started by: shadyuk
4 Replies

4. Shell Programming and Scripting

md5sum on a file with backslash in its name

Hi there, I found something very weird! Should I report that as a bug or is it me misusing the command? I've got a file with a backslash in its name. I know it's a horrible policy but it's not me. The file came from a mac computer because this is a backup server. Anyway, when using... (8 Replies)
Discussion started by: chebarbudo
8 Replies

5. Shell Programming and Scripting

Using md5sum to name file based on URL

I am trying to download a file and make the filename of the file be the md5sum of the URL. I know to use wgets to download the file but I do not know how to do the rest...any help would be appreciated. (2 Replies)
Discussion started by: The undertaker
2 Replies

6. Shell Programming and Scripting

Duplicate file remover using md5sum--good enough?

This is not a typical question. I have a fully working script but I'm interested in optimizing it. I frequently back up photos and movies from my digital camera and cell phone to both my home/work desktops, laptops, wife's netbook, and my home NAS and often end up with multiple versions of the... (2 Replies)
Discussion started by: Michael Stora
2 Replies

7. Shell Programming and Scripting

Restart script based on MD5sum

Ok, I run a small script, that restarts a perl script when it fails (it's a very unreliable perl script, but I can't change it, it's crucial, and I don't know perl) It outputs data into a logfile. Unfortunately, it also regularly hangs. This is a major problem because if it hangs, no data is... (6 Replies)
Discussion started by: Bakes
6 Replies

8. Shell Programming and Scripting

recursive md5sum check

so I have within my script a little md5sum check... find . ! -type d -print0 | xargs -0 md5sum And I want it to compare the generated values against a file so I'm trying... find . ! -type d -print0 | xargs -0 md5sum -c files.md5 I generated this file by redirecting the output of the... (2 Replies)
Discussion started by: blowFish@ubuntu
2 Replies

9. UNIX for Dummies Questions & Answers

Script to check for a file, check for 2hrs. then quit

I wish to seach a Dir for a specific file, once the file is found i will perform additional logic. If the file is not found within two hours, i would like to exit. Logically, I'm looking for the best way to approach this Thanks for any assistance in advance. Note: I'm using a C shell and... (2 Replies)
Discussion started by: mmarsh
2 Replies

10. UNIX for Dummies Questions & Answers

the file: MD5SUM

i downloaded a Linux distribution from a FTP site today, and i found there is a file named MD5SUM in the same directory, with the following contents: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 c9a4d963a49e384e10dec9c2bd49ad73 valhalla-SRPMS-disc1.iso 41b03d068e84d2a17147aa27e704f79b ... (1 Reply)
Discussion started by: samprax
1 Replies
Login or Register to Ask a Question
UG(4)							   BSD Kernel Interfaces Manual 						     UG(4)

NAME
ug -- Abit uGuru system hardware monitor SYNOPSIS
ug* at acpi? ug0 at isa? port 0xe0 DESCRIPTION
The ug driver provides support for the Abit uGuru hardware monitor to be used with the envsys(4) interface. The ug driver has 19 sensors: Sensor Units Typical Use CPU uK CPU Temp SYS uK System Temp PWN uK PWN Temp VCORE uV DC Core voltage DDR0 uV DC DDRVdd DDR1 uV DC DDRVtt NB uV DC NBVdd SB uV DC SBVdd HTV uV DC HTVdd AGP uV DC AGPVdd V5V uV DC Vdd5V V33V uV DC Vdd3V3 V5SB uV DC Vdd5VSB V33VD uV DC Vdd3VDual CPUF RPM CPU Fan NBF RPM NB Fan SYSF RPM SYS Fan AUXF RPM AUX Fan 1 AUXF2 RPM AUX Fan 2 SEE ALSO
acpi(4), envsys(4), envstat(8) HISTORY
The ug driver first appeared in NetBSD 4.0. AUTHORS
The ug driver was written by Mihai Chelaru <kefren@netbsd.ro>. BUGS
Interrupt support is unimplemented. BSD
May 8, 2007 BSD