![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
||||
|
||||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
You can also automate this using the batch file(bat) in DOS. Even that works nicely. I used it for my work.
-Nisha |
|
#12
|
|||
|
|||
|
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 |