Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP through cron using .netrc file a large file..

Status
Not open for further replies.

hd7106

Programmer
Nov 27, 2002
21
US
Hi!

I will be seeting up a cron event to automatically FTP about 200MB .zip file on Solaris 8 to a target system. I am aware of the .netrc entries and setting up the respective cron event.

What I would like to know is if there is a way/script I can create to check if the file transfer actually completed successfully and as an added feature to verify the time it took to transfer the file.

Any ideas/thoughts will be appreciated.
 
An idea is to split this file in some chuncks and then send them separately, which will be faster.
If you have the rexec capability with this system you can execute a cksum file on both sides just to see if they corresponds
 
If you put a "[tt]time[/tt]" in front of the [tt]ftp[/tt], then it will display the amount of time that command took in whatever log file you are generating.

Also, kind of like what sbix says, once the [tt]ftp[/tt] is complete in your script, do an [tt]rsh[/tt] to checksum the file on the other system. Your [tt]ftp[/tt] script can check the file both locally and remotely to see if they match.

One problem with [tt]ftp[/tt] is that it doesn't return error codes for the individual transfers it does. That makes it tough for your script to test for success. If you use [tt]rcp[/tt] instead, you can test the return code of the [tt]rcp[/tt] as soon as it completes.

Hope this helps.

 
The unfortunate part is I will be transferring this file to some Windows system. "rsh" and "rcp" commands will be out of question.

I'll try out "time" amd see how it works out

hd7106
 
Yes, rexec is not a service normally provided by Windows (SERVER side) but ... it's often provided the CLIENT side.
SO why don't execute a timed batch on the Windows side to GET the file with FTP and then execute a RSH through the Unix side to see the chekcsum value?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top