[Cialug] lftp vs ncftp

David Champion dchampion at visionary.com
Thu Oct 16 18:20:57 CDT 2008


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





More information about the Cialug mailing list