Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Automating ftp< Next Oldest | Next Newest >
jpeters Offline





Group: Members
Posts: 804
Joined: April 2006
Posted: Nov. 18 2007,21:30 QUOTE

I just discovered a much faster way of doing routines like updating web  pages, etc., using automated scripts.  First, setup .netrc with user name, password:

example:
01 machine mysite.net login xxxxx password xxxxxxx

Now write your routine to a  file. Common commands include cd, send, get, bye:

example, ftp_script:

cd /mypath/file
get file
bye

To run, type" ftp mysite.net < ftp_script" and the task is performed within seconds.  The script can be run within a larger script, for example, that opens amaya.uci to the file you just ftp'd over.  Very fast!!!

example:

  #!/bin/bash
    ftp mysite.net < get_index
    [ -d  /opt/amaya ] || mydsl-load /mnt/hda3/Downloads/amaya.uci
 
     /opt/amaya/wx/bin/amaya index.htm &
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Nov. 18 2007,22:00 QUOTE

The use of .netrc has been a part of DSL's webdata program to store and retrieve files on an ftp server automatically.
Back to top
Profile PM WEB 
jpeters Offline





Group: Members
Posts: 804
Joined: April 2006
Posted: Nov. 18 2007,22:30 QUOTE

Quote (roberts @ Nov. 18 2007,17:00)
The use of .netrc has been a part of DSL's webdata program to store and retrieve files on an ftp server automatically.

..great feature!

BTW, not sure how to get /apps/net/ftp  working.  It takes me to an ftp> window, but doesn't connect if I type in an address.
EDIT: just figured it out......(need 'open' command)
Back to top
Profile PM 
2 replies since Nov. 18 2007,21:30 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: Automating ftp

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code