View previous topic :: View next topic |
Author |
Message |
zen_guerrilla Guru
Joined: 18 Apr 2002 Posts: 343 Location: Greece
|
Posted: Sat Nov 16, 2002 7:18 pm Post subject: non-interactively fetching files w/ftp |
|
|
Hello world,
I have an ftp server w/ accounts (non-anonymous) and want to have another system fetching a file automatically from it via crontab with that script :
Code: | #!/bin/sh
cd /location/to/fetched
FILE="sh[`date +%d-%m-%y`].rar"
ncftpget -u user -p password ftp://147.27.12.235/sh_bkps/$FILE |
however ncftpget (v.3.0.2 - slack8.0 server ) says :
Code: | server said: No files found. |
Is there another way to make that ?
.:: zen ::. |
|
Back to top |
|
|
ElCondor Guru
Joined: 10 Apr 2002 Posts: 520 Location: Vienna, Austria, Europe
|
Posted: Sat Nov 16, 2002 7:22 pm Post subject: |
|
|
wget? or default good old plain "ftp" with the necessary login/pw information in the ~/.netrc file?
okay, more in detail:
.netrc: Code: |
machine some.server.there
login iamuser
passwort secret |
and just call it by
Code: | ftp some.server.there < mycommands |
where you put everything to do in the file mycommands, e.g. Code: |
cd /my/dir
bin
prompt off
mget desired.files.*
put to.the.world.file
quit
|
* ElCondor pasa * _________________ Here I am the victim of my own choices and I'm just starting! |
|
Back to top |
|
|
zen_guerrilla Guru
Joined: 18 Apr 2002 Posts: 343 Location: Greece
|
Posted: Sat Nov 16, 2002 8:16 pm Post subject: |
|
|
That exactly what I was looking for. Thanx
.:: zen ::. |
|
Back to top |
|
|
|