![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
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-27-2008 01:23 AM |
| Automated shtudown | joe1967 | Shell Programming and Scripting | 5 | 05-29-2007 08:04 PM |
| automated ftp. | sangfroid | Shell Programming and Scripting | 10 | 05-07-2007 11:52 AM |
| FTP automated? | n9ninchd | UNIX for Dummies Questions & Answers | 6 | 05-18-2001 10:21 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
||||
|
Try something like this for the ftp script:
#!/usr/bin/ksh ftp -v -n "YOUR.IP.ADD.RESS" << cmd user "user" "passwd" cd /distant/directory lcd /local/directoryget ssh_install get ( or put) your files quit cmd All you have to do after is to create the cron Will that help? Jason |
|
||||
|
How can we get the exit status of this script so that we know if the ftp was successful? echo $? always returns 0 in this or similar script. I have a similar script which uploads a file to an ftp site but the exit status always returns true whether the file to be uploaded exists or not.
|
|
||||
|
You can write a smilar FTP script.
if you are "putting" a file, replace the put with ls and see if your file is in there. if you are "getting" a file, search for the file in your local directory and you can then know if the FTP was successfull or not. |
|
||||
|
Thanks all..
even I was looking for automatic FTP and it worked for me too. however I still have one problem as how can I FTP all directories with thier respective sub-directories between two hosts. Its possible as of now but the structer of the directory has to be existing before, so that FTP can put all the files in their respective sub-directories by saying "mget *". But if the directory structure does not exists then FTP "mget *" command only gets files from home to home and not sub-directories and the files existing in the respective sub-directories. can you all please help ? is there any way ? Thanks and Regards Taher |
| Sponsored Links | ||
|
|