[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: HOWTO : make a automatique FTP
- From: "Anthony E. Greene" <agreene pobox com>
- To: redhat-list redhat com
- Subject: Re: HOWTO : make a automatique FTP
- Date: Wed Jul 31 17:23:08 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 31-Jul-2002/20:25 +0200, cana rich <canarich yahoo com> wrote:
>Hello,
>
> I would like to make a ftp (mput for exemple)
>automatiquely launched by a crontab.
>Is someone can help me, please?
>
>- Can i do it with a shell or have i to do this with a
>C program?
>- What is the syntax?
>- ftp -uuser -ppassword binary mput filename ?
The ftp client ships with Linux is scriptable. Just put the commands
that you would normally type into a file. It might look like this:
open ftp.mydomain.com
lcd /some/local/dir
cd /some/remote/dir
binary
prompt
mput *
quit
See the ftp man page for a description of all commands.
If the server requires a login, create a ~/.netrc file with permissions
0600 that contains the login info (man netrc):
machine ftp.mydomain.com login myname password mypassword
Then run ftp with the script as input:
ftp < myftpscript
Tony
- --
Anthony E. Greene <mailto:agreene pobox com>
OpenPGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D
AOL/Yahoo Chat: TonyG05 HomePage: <http://www.pobox.com/~agreene/>
Linux: the choice of a GNU Generation. <http://www.linux.org/>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Anthony E. Greene 0x6C94239D <agreene pobox com>
iD8DBQE9SEyxpCpg3WyUI50RAvzGAJ4n98628pAW5wqQ+upDU0dBkeZr2QCeKUU5
55hXJsD9wxUFdSPctt+afM0=
=/xPI
-----END PGP SIGNATURE-----
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]