The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
scp automated script gholdbhurg UNIX for Advanced & Expert Users 5 10-26-2008 10:23 PM
Automated shtudown joe1967 Shell Programming and Scripting 5 05-29-2007 05:04 PM
automated ftp. sangfroid Shell Programming and Scripting 10 05-07-2007 08:52 AM
FTP automated? n9ninchd UNIX for Dummies Questions & Answers 6 05-18-2001 07:21 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 06-11-2002
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
For the first time I would suggest creating a tar file of the original, ftp it over and create the same directory structure using the tar file.
Forum Sponsor
  #9  
Old 06-11-2002
Registered User
 

Join Date: Jan 2002
Location: India
Posts: 111
This could be one of the solution for estimating accurately as to whether a file has been successfully transfered or not via a ftp session, as requested by "psingh".

Following is the script that can do so :

Create and store following details in a separate file
vi ftpdata
Enter the following details
o "Address"
user "username" "password"
get file1
Save and quit from the file

Now in a separate shell script file write the following command:
ftp -v < ftpdata > ftpdata.out 2> ftpdata.out
Now check for the following string in the ftpdata.out file by the grep command:
"Transfer Complete" or "Tansfer Successful"
Presence of it would hence mean that the transfer was success else was a complete failure.

Now using this technique one can easily design in new of transfering multiple files via ftp session and know accurately whether the file was successfully transfered or not.
__________________
Regards,
Satya Prakash Prasad
  #10  
Old 06-11-2002
Registered User
 

Join Date: Jun 2002
Posts: 9
Question hi abt Automated FTP

Hi RTM
thanks for your reply..yes what i understand from what you have suggested is that take a tar of the complete directory structure on a tape. then extract that tape on the other host manually and then start FTPing the complete directory structures..

I tried the same above and now i can FTP all the files with sub-direcotories..
however what i feel is that FTP cannot itself create sub-direcoties while FTPing...is that rite ?

thanx and regards
Taher
  #11  
Old 06-24-2002
Registered User
 

Join Date: Jun 2002
Location: Chennai, India
Posts: 110
You can also automate this using the batch file(bat) in DOS. Even that works nicely. I used it for my work.

-Nisha
  #12  
Old 07-10-2002
Registered User
 

Join Date: Jul 2002
Posts: 2
Lightbulb

In Unix if u r looking for a completely automated ftping process, i feel its not possible , not possible simply because the ftp process does not return a valid exit status, an exit can occur due to many reasons and if u r to monitor whats happening then u cannot call it an automated ftp session. The only way out that i found especially when ur ftping takes place for hours,was to use another software called ncftp,which worked wonderful for me.

These r the status codes returned from 0- 12
Success.
Could not connect to remote host.
Could not connect to remote host - timed out.
Transfer failed.
Transfer failed - timed out.
Directory change failed.
Directory change failed - timed out.
Malformed URL.
Usage error.
Error in login configuration file.
Library initialization failed.
Session initialization failed.

which the normal ftp application does not.

This will solve the problem

Carlos
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:50 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0