[Cialug] lftp vs ncftp

Barry Von Ahsen barry at vonahsen.com
Thu Oct 16 15:01:18 CDT 2008


lftp -u username,password -e 'put filename.txt' ftp.myhostname.com

worked for me

-barry


David Champion 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



More information about the Cialug mailing list