Ubuntu – lftp: how to copy file on remote server

copyftpUbuntu

How to copy file on remote server using lftp?

Moving files is as easy as using mv command, but is there any command equivalent to cp?

Best Answer

from the man page:

ftpcopy
Obsolete. Use one of the following instead:
    get ftp://... -o ftp://...
    get -O ftp://... file1 file2...
    put ftp://...
    mput ftp://.../*
    mget -O ftp://... ftp://.../*
or  other  combinations  to  get FXP transfer (directly between two ftp
servers).  lftp would fallback to plain copy (via client) if FXP trans-
fer cannot be initiated or ftp:use-fxp is false.

so you can copy a file, by doing:

get filename -o ftp://user@ftpsite/directory/copyoffile

perhaps that will work better than a put/get if only because you'll be doing something like FXP, and the server will be using its own local bandwidth