View Full Version : ftp shell script
mcrosby
30th May 2006, 20:03
hello everyone,
i have developed a shell script to connect through ftp to a remote server. I was able to get the ftp working and automatically transfer files. Now what i am trying to do is download files from the remote server and then compare those files to the files located in a folder on my local drive. If the files are not equal i want it to output an error to a file or if they are equal show that the operation completed successfully. Anyone have any ideas or can point me in the right direction?
falko
31st May 2006, 01:14
You can use the md5sum command and compare the MD5 hashes of the files. If they are not identical, then the files differ.
mcrosby
31st May 2006, 14:42
I am not sure how to use the md5 hashes as I am fairly new to shell scripting do you have any references websites or could you get me started?
mcrosby
31st May 2006, 15:34
Ok i seem to have the diff script working on its own and it records the differences to a file. How would i go about combining my ftp script and my diff script because if i end the ftp script it closes out the script entirely.
falko
1st June 2006, 01:33
do you have any references websites or could you get me started?
Have a look here: http://www.tldp.org/LDP/abs/html/index.html
EvanCarroll
11th June 2006, 10:07
hello everyone,
i have developed a shell script to connect through ftp to a remote server. I was able to get the ftp working and automatically transfer files. Now what i am trying to do is download files from the remote server and then compare those files to the files located in a folder on my local drive. If the files are not equal i want it to output an error to a file or if they are equal show that the operation completed successfully. Anyone have any ideas or can point me in the right direction?
This shoulden't require a script at all, you are reinventing the wheel.
Please see `man wget` and -m
urnetmate
6th January 2007, 15:14
hello everyone,
i have developed a shell script to connect through ftp to a remote server. I was able to get the ftp working and automatically transfer files. Now what i am trying to do is download files from the remote server and then compare those files to the files located in a folder on my local drive. If the files are not equal i want it to output an error to a file or if they are equal show that the operation completed successfully. Anyone have any ideas or can point me in the right direction?
Please telll me code for shell script to connect ftp.
Waiting for replay..
Thanks in advance
urnetmate
8th January 2007, 11:20
Have a look here: http://www.tldp.org/LDP/abs/html/index.html
I am getting error "Passive mode refused" on mget shell command
Please help..
Thanks in Advance
falko
9th January 2007, 16:12
I am getting error "Passive mode refused" on mget shell command
Do you mean wget?
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.