LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   regarding lftp (http://www.linuxquestions.org/questions/linux-software-2/regarding-lftp-921736/)

santhosh-e 01-03-2012 05:13 AM

regarding lftp
 
hi,

lftp -c "debug 10; open -u admin,PASS $<; rm -r -f /http; mkdir /http/config; mput -O /http/config www$(C_TOOL)/*;"
suppose i am giving these command in makefile i am facing following error.

---- Resolving host address...
---- 1 address found: 192.168.5.5
---- dns cache hit
---- Connecting to proxy 192.168.5.5 (192.168.5.5) port 3128

i cant able to download goes to hanging situation throwing socket timed out.
can u tell us what the problem.
regards
santhosh babu

lithos 01-03-2012 05:45 AM

Hi,

first dissect the command line you are passing to LFTP:
Code:

lftp -c "debug 10; open -u admin,PASS $<;
Code:

rm -r -f /http;
Code:

mkdir /http/config;
Code:

mput -O "/http/config www$(C_TOOL)/*";"  <--- probably because of "config www" space between it's better to include quotation marks
so use one or two at a time to find which is the problem,
and add a siteaddress to the command line, so it will know where to connect (now there is no site/IP address to connect to)
like:
Code:

lftp -c "open HOSTNAME user $USER $PASSWD && cd "/http/config www" && mirror -R "directory";"
try it if it works, then continue adding commands to what you want to achieve
note: I'm using && between the commands to execute not ";" like you

I think your syntax may be wrong (using open -u admin,PASS $<;) but I can be wrong too.

good luck

lftp script example

santhosh-e 01-03-2012 07:52 AM

regarding tftp
 
hi,


how to dis-select the ftp in command line.
i update the changes what you have given but still i am facing the same error.

its not working.

lithos 01-03-2012 10:22 AM

dissect - 1. To cut apart or separate (tissue), especially for anatomical study.
2. To examine, analyze, or criticize in minute detail

meaning to try first only one command (if it works) then in steps, add second command etc.

Your first part
Code:

lftp -c "debug 10; open -u admin,PASS $<;
is by my opinion not working
so you should work on this to get the login to the FTP and then adding the commands to copy
Code:

mput -O "/http/config www$(C_TOO....
I would try first:
Code:

# lftp -c  "open HOSTNAME && user USER PASSWD && cd /http/config_dir && ls"
and see if you get logged in and then cd to /http/config ... <--- adjust this directory to where you want
&& ls should list the directory
and then lftp will exit/ return to command prompt

substitute HOSTNAME and USER PASSWD with your FTP site_address and username/password


All times are GMT -5. The time now is 06:46 AM.