automatically upload files to a ftp-server

ogg

Registered
i want to create a shell-script to automatically upload a litte tar-archiv to the webserver. i have typing the following command:

ftp -u ftp://[ip-adress] user [username] password [mypassword] /source/archiv.tar /target/archiv.tar

it doesn't work!

can anyone give me some help?

thanks!
 
Try using this:

Create a ".netrc" file that contains the following (the dot denotes invisable file) in the directory that your ftp script is.

machine ftp.server.name
login account_login
password password

set the permissions for the owner to have read and write access only
-rw-------

then create your shell script to ftp to the "machine" name in that file, it will automatically log in and perform whatever other commands you have in the script.

Hope that was clear enough, good luck!
 
i have downloaded the ncftp-package (listed on versiontracker.com) and used the ncftpput command, it rocks! very simple, more powerfull than the default ftp-client in os x.
 
Thanks to gumse, great it works!

another question: how can i password-protect my tar-file? is there a way with zip, compress or anything else?
 
Back
Top