FTP question
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix administration > FTP question




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    FTP question  
Pete Rau


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 10:11 PM

Is there a way to invoke FTP and pass parms to ftp through a file.
Something like FTP <input.







[ Post a follow-up to this message ]



    Re: FTP question  
S. Anthony Sequeira


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 10:11 PM

On Fri, 09 Jan 2004 12:01:37 -0700, Pete Rau penned:
quote:
> Is there a way to invoke FTP and pass parms to ftp through a file. > Something like FTP <input.
If you are able to install software, have a look at ncftp. Alternatively, expect, may be able to help you, though I may well be wrong. -- Tony




[ Post a follow-up to this message ]



    Re: FTP question  
phn@icke-reklam.ipsec.nu


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 10:11 PM

Pete Rau <Pete_Rau@beamspeed.net> wrote:
quote:
> Is there a way to invoke FTP and pass parms to ftp through a file. > Something like FTP <input.
yes : ( depending on version used of course ) From memory ( check your manpages ) ftp -n <host> <<EOF user <username> pass <password> get file put file EOF If you need "filenames as parameters adjust slightly : echo "ftp -n <host> <<EOF" > tempfile echo "user <username>" >> tempfile echo "pass <password>" >> tempfile echo "get $1" >> tempfile echo "EOF" >> tempfile # now execute the above sh tempfile # and clean up rm tempfile -- Peter Håkanson IPSec Sverige ( At Gothenburg Riverside ) Sorry about my e-mail address, but i'm trying to keep spam out, remove "icke-reklam" if you feel for mailing me. Thanx.




[ Post a follow-up to this message ]



    Re: FTP question  
Danny


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 10:11 PM

Pete Rau wrote:
quote:
> Is there a way to invoke FTP and pass parms to ftp through a file. > Something like FTP <input. > >
Alternatively, check `man ftp` to see that you have a version that supports .netrc. If so, you can create $HOME/.netrc with a macdef init entry that runs all your commands, like so: -------------------------------------------------------------- machine sunsite.unc.edu login ftp password myname@ macdef init cd pub/linux bin hash get 00-find.Linux.gz quit -------------------------------------------------------------- Then, chmod 600 $HOME/.netrc Don't forget the empty line which ends the init macro. Then, just run `ftp sunsite.unc.edu` and watch the magic happen. -- Danny C.




[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:24 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register