[Cialug] lftp vs ncftp

Tom Pohl tom at tcpconsulting.com
Fri Oct 17 09:01:38 CDT 2008


I always do it like this:

lftp -c "open remotehost ; user myuser mypass ; put filename"

You can basically put commands separated by ';'s as if you were  
playing with it interactively.

-Tom

On Oct 16, 2008, at 7:51 PM, Dave Crouse wrote:

> You need to put the command in "quotes" I think.......
> Something like
>
> lftp -u username,password -e "mirror --delete --only-newer --verbose
> path/to/source_directory path/to/target_directory" ftpsite
>
>
> I think your just missing the quotes.
>
>
> Dave Crouse
>
>
>
>
> On Thu, Oct 16, 2008 at 6:20 PM, David Champion <dchampion at visionary.com 
> > wrote:
>> I'm used to using ncftp, trying to switch over to using lftp on  
>> RH / Centos
>> machines where ncftp isn't always available.
>>
>> Here's an example of a one-liner in ncftp:
>>
>> ncftpput -F -u myusername -p mypassword ftp.myhostname.com
>> /remote/destination/path  /local/path/filename.txt
>>
>> I'm trying to do something similar in lftp, but it looks to me like  
>> you have
>> to use a 2nd script to run a simple put command, and call the  
>> script with:
>>
>> lftp -u myusername,mypassword ftp.myhostname.com -F myscript.lftp
>>
>> Where myscript.lftp say:
>>
>> cd /remote/destination/path
>> put /local/path/filename.txt
>>
>> Does anyone know of a better what to do this? I tried doing  
>> something like
>> this:
>>
>> lftp -u username,password -e put filename.txt ftp.myhostname.com
>>
>> From reading the man page, it looks like that should work, but it  
>> doesn't...
>> gives the error:
>>  Try `help put' for more information
>>
>> -dc
>>
>>
>>
>> _______________________________________________
>> Cialug mailing list
>> Cialug at cialug.org
>> http://cialug.org/mailman/listinfo/cialug
>>
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug



More information about the Cialug mailing list