
30th May 2006, 20:03
|
|
Junior Member
|
|
Join Date: May 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
ftp shell script
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?
|

31st May 2006, 01:14
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,853
Thanks: 781
Thanked 1,558 Times in 1,477 Posts
|
|
You can use the md5sum command and compare the MD5 hashes of the files. If they are not identical, then the files differ.
|

31st May 2006, 14:42
|
|
Junior Member
|
|
Join Date: May 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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?
|

31st May 2006, 15:34
|
|
Junior Member
|
|
Join Date: May 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

1st June 2006, 01:33
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,853
Thanks: 781
Thanked 1,558 Times in 1,477 Posts
|
|
Quote:
|
Originally Posted by mcrosby
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
|

11th June 2006, 10:07
|
|
Junior Member
|
|
Join Date: Jun 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
|
Originally Posted by mcrosby
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
|

6th January 2007, 15:14
|
|
Junior Member
|
|
Join Date: Jan 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
code to connect ftp shell script
Quote:
|
Originally Posted by mcrosby
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
|

8th January 2007, 11:20
|
|
Junior Member
|
|
Join Date: Jan 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
|
Originally Posted by falko
|
I am getting error "Passive mode refused" on mget shell command
Please help..
Thanks in Advance
|

9th January 2007, 16:12
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,853
Thanks: 781
Thanked 1,558 Times in 1,477 Posts
|
|
Quote:
|
Originally Posted by urnetmate
I am getting error "Passive mode refused" on mget shell command
|
Do you mean wget?
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 15:45.
|
Recent comments
2 hours 8 min ago
7 hours 56 min ago
9 hours 47 min ago
11 hours 32 min ago
15 hours 22 min ago
21 hours 7 min ago
21 hours 18 min ago
1 day 1 hour ago
1 day 7 hours ago
1 day 12 hours ago