O'Reilly logo

Linux in a Nutshell, Fourth Edition by Aaron Weber, Stephen Figgins, Ellen Siever

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

lftp

Synopsis

                  lftp [options] [url]

File transfer program with more features than ftp. The lftp command allows FTP and HTTP protocol transfers, plus other protocols including FISH (SSH based), FTPS, and HTTPS. It uses a shell-like command interface and offers job control in a manner similar to bash. lftp has two important reliability features: it resumes failed or interrupted transactions, and it goes into the background automatically if it is quit in the middle of a file transfer.

Options

-d

Run in debug mode.

-e commands

Start, execute the specified commands, and then wait for further instructions.

-p portnumber

Connect to the specified port number.

-u user[,pass]

Login to the server with the username (and, optionally, password) you specify.

-f scriptfile

Run the specified script file of lftp commands, then exit.

-c commands

Run the commands specified, then exit.

Commands

The lftp commands are similar to those for ftp. However, lftp lacks or uses different mechanisms for a number of commands, including $, ascii, binary, case, and macdef. It also adds the following:

alias [name [value]]

Create an alias for a command. For example, you could set dir to be an alias for ls -lf.

anon

Set the username to anonymous. This is the default username.

at

Execute a command at a given time, as with the at command in an actual shell.

bookmark [arguments]

The lftp bookmark command used with the following arguments will add, delete, edit, import, or list bookmarks, respectively:

  • add name url

  • del

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required