Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
non-interactively fetching files w/ftp
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
zen_guerrilla
Guru
Guru


Joined: 18 Apr 2002
Posts: 343
Location: Greece

PostPosted: Sat Nov 16, 2002 7:18 pm    Post subject: non-interactively fetching files w/ftp Reply with quote

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
View user's profile Send private message
ElCondor
Guru
Guru


Joined: 10 Apr 2002
Posts: 520
Location: Vienna, Austria, Europe

PostPosted: Sat Nov 16, 2002 7:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
zen_guerrilla
Guru
Guru


Joined: 18 Apr 2002
Posts: 343
Location: Greece

PostPosted: Sat Nov 16, 2002 8:16 pm    Post subject: Reply with quote

That exactly what I was looking for. Thanx :)

.:: zen ::.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum