SysTutorials

Linux Manual Pages › Section 1

lftp(1)

NAME

lftp – Sophisticated file transfer program

SYNTAX

lftp [-d] [-e cmd] [-p port] [-u user[,pass]] [site]
lftp -f script_file
lftp -c commands
lftp –version
lftp –help

VERSION

This man page documents lftp version 4.8.1.

DESCRIPTION

lftp is a file transfer program that allows sophisticated FTP, HTTP and other connections to other hosts. If site is specified then lftp will connect to that site otherwise a connection has to be established with the open command.

lftp can handle several file access methods – FTP, FTPS, HTTP, HTTPS, HFTP, FISH, SFTP and file (HTTPS and FTPS are only available when lftp is compiled with GNU TLS or OpenSSL library). You can specify the method to use in `open URL’ command, e.g. `open http://www.us.kernel.org/pub/linux’. HFTP is ftp-over-http-proxy protocol. It can be used automatically instead of FTP if ftp:proxy is set to `http://proxy[:port]’. Fish is a protocol working over an ssh connection to a unix account. SFtp is a protocol implemented in SSH2 as SFTP subsystem.

Besides FTP-like protocols, lftp has support for BitTorrent protocol as `torrent’ command. Seeding is also supported.

Every operation in lftp is reliable, that is any non-fatal error is handled properly and the operation is repeated. So if downloading breaks, it will be restarted from the point automatically. Even if FTP server does not support the REST command, lftp will try to retrieve the file from the very beginning until the file is transferred completely.

lftp has shell-like command syntax allowing you to launch several commands in parallel in background (&). It is also possible to group commands within () and execute them in background. All background jobs are executed in the same single process. You can bring a foreground job to background with ^Z (c-z) and back with command `wait’ (or `fg’ which is alias to `wait’). To list running jobs, use command `jobs’. Some commands allow redirecting their output (cat, ls, …) to file or via pipe to external command. Commands can be executed conditionally based on termination status of previous command (&&, ||).

If you exit lftp before all jobs are not finished yet, lftp will move itself to nohup mode in background. The same thing happens with a real modem hangup or when you close an xterm.

lftp has built-in mirror which can download or update a whole directory tree. There is also reverse mirror (mirror -R) which uploads or updates a directory tree on server. Mirror can also synchronize directories between two remote servers, using FXP if available.

There is command `at’ to launch a job at specified time in current context, command `queue’ to queue commands for sequential execution for current server, and much more.

On startup, lftp executes /etc/lftp.conf and then ~/.lftprc and ~/.lftp/rc (or ~/.config/lftp/rc if ~/.lftp does not exist). You can place aliases and `set’ commands there. Some people prefer to see full protocol debug, use `debug’ to turn the debug on. Use `debug 3′ to see only greeting messages and error messages.

lftp has a number of settable variables. You can use `set -a’ to see all variables and their values or `set -d’ to see list of defaults. Variable names can be abbreviated and prefix can be omitted unless the rest becomes ambiguous.

If lftp was compiled with OpenSSL (configure –with-openssl) it includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)

Commands

! shell command

Launch shell or shell command.

!ls

To do a directory listing of the local host.

alias [name [value]]

Define or undefine alias name. If value is omitted, the alias is undefined, else it takes the value value. If no argument is given the current aliases are listed.

alias dir ls -lF
alias less zmore

at time [ — command ]

Wait until the given time and execute given (optional) command. See also at(1).

attach [PID]

Attach the terminal to specified backgrounded lftp process.

bookmark [subcommand]

The bookmark command controls bookmarks.

Site names can be used in the open command directly as-is or in any command that accepts input URLs using the bm:site/path format.

add <name> [<loc>]add current place or given location to bookmarks and bind to given name
del <name>remove bookmark with name
editstart editor on bookmarks file
import <type>import foreign bookmarks
listlist bookmarks (default)

cache [subcommand]

The cache command controls local memory cache. The following subcommands are recognized:

statprint cache status (default)
on|offturn on/off caching
flushflush cache
size limset memory limit, -1 means unlimited
expire Nxset cache expiration time to N seconds (x=s) minutes (x=m) hours (x=h) or days (x=d)

cat files

cat outputs the remote file(s) to stdout. (See also more, zcat and zmore)

cd rdir

Change current remote directory. The previous remote directory is stored as `-‘. You can do `cd -‘ to change the directory back. The previous directory for each site is also stored on disk, so you can do `open site; cd -‘ even after lftp restart.

chmod [OPTS] mode files…

Change permission mask on remote files. The mode can be an octal number or a symbolic mode (see chmod(1)).

-c, –changeslike verbose but report only when a change is made
-f, –quietsuppress most error messages
-v, –verboseoutput a diagnostic for every file processed
-R, –recursivechange files and directories recursively

close [-a]

Close idle connections. By default only with the current server, use -a to close all idle connections.

cls [OPTS] files…

`cls’ tries to retrieve information about specified files or directories and outputs the information according to format options. The difference between `ls’ and `cls’ is that `ls’ requests the server to format file listing, and `cls’ formats it itself, after retrieving all the needed information.

-1 single-column output
-a, –allshow dot files
-B, –basenameshow basename of files only
 –block-size=SIZuse SIZ-byte blocks
-d, –directorylist directory entries instead of contents
-F, –classifyappend indicator (one of /@) to entries
-h, –human-readableprint sizes in human readable format (e.g., 1K)
 –silikewise, but use powers of 1000 not 1024
-k, –kilobyteslike –block-size=1024
-l, –longuse a long listing format
-q, –quietdon’t show status
-s, –sizeprint size of each file
 –filesizeif printing size, only print size for files
-i, –nocasecase-insensitive pattern matching
-I, –sortnocasesort names case-insensitively
-D, –dirsfirstlist directories first
 –sort=OPT"name", "size", "date"
-S sort by file size
 –user, –group,
 –perms, –date,
 –linkcount, –linksshow individual fields
 –time-style=STYLEuse specified time format

command cmd args…

execute given command ignoring aliases.

debug [OPTS] level|off

Switch debugging to level or turn it off. Options:

-T truncate output file
-o <file> redirect debug output to the file
-c show message context
-p show PID
-t show timestamps

echo [-n] string

Prints (echos) the given string to the display.

edit [OPTS] file

Retrieve remote file to a temporary location, run a local editor on it and upload the file back if changed. Options:

-k keep the temporary file
-o <temp> explicit temporary file location

eval [-f format ] args…

without -f it executes given arguments as a command. With -f, arguments are transformed into a new command. The format can contain plain text and placeholders $0…$9 and $@, corresponding to the arguments.

exit [bg] [top] [parent] [kill] [code]

exit will exit from lftp or move to background if there are active jobs. If no job is active, code is passed to operating system as lftp’s termination status. If code is omitted, the exit code of last command is used.

`exit bg’ forces moving to background when cmd:move-background is false. `exit top’ makes top level `shell’ (internal lftp command executor) terminate. `exit parent’ terminates the parent shell when running a nested script. `exit kill’ kills all numbered jobs before exiting. The options can be combined, e.g. `at 08:00 — exit top kill &’ kills all jobs and makes lftp exit at specified time.

fg

Alias for `wait’.

find [OPTS] directory…

List files in the directory (current directory by default) recursively. This can help with servers lacking ls -R support. You can redirect output of this command. Options:

-d MD, –max-depth=MDspecify maximum scan depth
-l, –lsuse long listing format

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 transfer cannot be initiated or ftp:use-fxp is false.

get [-E] [-a] [-c] [-e] [-P N] [-O base] rfile [-o lfile] …

Retrieve the remote file rfile and store it as the local file lfile. If -o is omitted, the file is stored to local file named as base name of rfile. You can get multiple files by specifying multiple instances of rfile (and -o lfile). Does not expand wildcards, use mget for that.

-ccontinue, reget
-Edelete source files after successful transfer
-edelete target file before the transfer
-ause ascii mode (binary is the default)
-P Ndownload N files in parallel
-O <base>specifies base directory or URL where files should be placed

Examples:

get README
get README -o debian.README
get README README.mirrors
get README -o debian.README README.mirrors -o debian.mirrors
get README -o ftp://some.host.org/debian.README
get README -o ftp://some.host.org/debian-dir/   (end slash is important)

get1 [OPTS] rfile

Transfer a single file. Options:

-o <lfile>destination file name (default – basename of rfile)
-ccontinue, reget
-Edelete source files after successful transfer
-ause ascii mode (binary is the default)
-dcreate the directory of the target file
–source-region=<from-to>transfer specified region of source file
–target-position=<pos>position in target file to write data at

glob [OPTS] [command] patterns

Glob given patterns containing metacharacters and pass result to given command or return appropriate exit code.

-fplain files (default)
-ddirectories
-aall types
–existreturn zero exit code when the patterns expand to non-empty list
–not-existreturn zero exit code when the patterns expand to an empty list

Examples:

glob echo *
glob --exist *.csv && echo "There are *.csv files"

help [cmd]

Print help for cmd or if no cmd was specified print a list of available commands.

jobs [OPTS] [job_no…]

List running jobs. If job_no is specified, only list a job with that number. Options:

-vverbose, several -v increase verbosity
-rlist just one specified job without recursion

kill all|job_no

Delete specified job with job_no or all jobs. (For job_no see jobs)

lcd ldir

Change current local directory ldir. The previous local directory is stored as `-‘. You can do `lcd -‘ to change the directory back.

ln [-s] existing-file new-link

Make a hard/symbolic link to an existing file. Option -s selects creation of a symbolic link.

local command

Run specified command with local directory file:// session instead of remote session. Examples:

local pwd
local ls
local mirror /dir1 /dir2

lpwd

Print current working directory on local machine.

ls params

List remote files. You can redirect output of this command to file or via pipe to external command. By default, ls output is cached, to see new listing use rels or cache flush.

mget [-c] [-d] [-a] [-E] [-e] [-P N] [-O base] files

Gets selected files with expanded wildcards.

-ccontinue, reget.
-dcreate directories the same as file names and get the files into them instead of current directory.
-Edelete source files after successful transfer
-edelete target file before the transfer
-ause ascii mode (binary is the default)
-P Ndownload N files in parallel
-O <base>specifies base directory or URL where files should be placed

mirror [OPTS] [source [target]]

Mirror specified source directory to the target directory.

By default the source is remote and the target is a local directory. When using -R, the source directory is local and the target is remote. If the target directory is omitted, base name of the source directory is used. If both directories are omitted, current local and remote directories are used.

The source and/or the target may be URLs pointing to directories.

If the target directory ends with a slash (except the root directory) then base name of the source directory is appended.

-c, –continuecontinue a mirror job if possible
-e, –deletedelete files not present at the source
 –delete-excludeddelete files excluded at the target
 –delete-firstdelete old files before transferring new ones
 –depth-firstdescend into subdirectories before transferring files
 –scan-all-firstscan all directories recursively before transferring files
-s, –allow-suidset suid/sgid bits according to the source
 –allow-chowntry to set owner and group on files
 –asciiuse ascii mode transfers (implies –ignore-size)
 –ignore-timeignore time when deciding whether to download
 –ignore-sizeignore size when deciding whether to download
 –only-missingdownload only missing files
 –only-existingdownload only files already existing at target
-n, –only-newerdownload only newer files (-c won’t work)
 –upload-olderupload even files older than the target ones
 –transfer-alltransfer all files, even seemingly the same at the target site
 –no-empty-dirsdon’t create empty directories (implies –depth-first)
-r, –no-recursiondon’t go to subdirectories
 –recursion=MODEgo to subdirectories on a condition
 –no-symlinksdon’t create symbolic links
-p, –no-permsdon’t set file permissions
 –no-umaskdon’t apply umask to file modes
-R, –reversereverse mirror (put files)
-L, –dereferencedownload symbolic links as files
 –overwriteoverwrite plain files without removing them first
 –no-overwriteremove and re-create plain files instead of overwriting
-N, –newer-than=SPECdownload only files newer than specified time
 –older-than=SPECdownload only files older than specified time
 –size-range=RANGEdownload only files with size in specified range
-P, –parallel[=N]download N files in parallel
 –use-pget[-n=N]use pget to transfer every single file
 –on-change=CMDexecute the command if anything has been changed
 –looprepeat mirror until no changes found
-i RX, –include=RXinclude matching files
-x RX, –exclude=RXexclude matching files
-I GP, –include-glob=GPinclude matching files
-X GP, –exclude-glob=GPexclude matching files
 –include-rx-from=FILE
 –exclude-rx-from=FILE
 –include-glob-from=FILE
 –exclude-glob-from=FILEload include/exclude patterns from the file, one per line
-f FILE, –file=FILEmirror a single file or globbed group (e.g. /path/to/*.txt)
-F DIR, –directory=DIRmirror a single directory or globbed group (e.g. /path/to/dir*)
-O DIR, –target-directory=DIRtarget base path or URL
-v, –verbose[=level]verbose operation
 –log=FILEwrite lftp commands being executed to FILE
 –script=FILEwrite lftp commands to FILE, but don’t execute them
 –just-print, –dry-runsame as –script=-
 –max-errors=Nstop after this number of errors
 –skip-noaccessdon’t try to transfer files with no read access.
 –use-cacheuse cached directory listings
 –Remove-source-filesremove source files after transfer (use with caution)
 –Remove-source-dirsremove source files and directories after transfer (use with caution). Top level directory is not removed if it’s name ends with a slash.
 –Movesame as –Remove-source-dirs
-a same as –allow-chown –allow-suid –no-umask

RX is an extended regular expression, just like in egrep(1).

GP is a glob pattern, e.g. `*.zip’.

Include and exclude options can be specified multiple times. It means that a file or directory would be mirrored if it matches an include and does not match to excludes after the include, or does not match anything and the first check is exclude. Directories are matched with a slash appended.

Note that symbolic links are not created when uploading to remote server, because FTP protocol cannot do it. To upload files the links refer to, use `mirror -RL’ command (treat symbolic links as files).

For options –newer-than and –older-than you can either specify a file or time specification like that used by at(1) command, e.g. `now-7days’ or `week ago’. If you specify a file, then modification time of that file will be used.

Verbosity level can be selected using –verbose=level option or by several -v options, e.g. -vvv. Levels are:

0 - no output (default)
1 - print actions
2 - +print not deleted file names (when -e is not specified)
3 - +print directory names which are mirrored

–only-newer turns off file size comparison and uploads/downloads only newer files even if size is different. By default older files are transferred and replace newer ones.

–upload-older allows replacing newer remote files with older ones (when the target side is remote). Some remote back-ends cannot preserve timestamps so the default is to keep newer files.

Recursion mode can be one of `always’, `never’, `missing’, `newer’. With the option `newer’ mirror compares timestamps of directories and enters a directory only if it is older or missing on the target side. Be aware that when a file changes the directory timestamp may stay the same, so mirror won’t process that directory.

The options –file and –directory may be used multiple times and even mixed provided that base directories of the paths are the same.

You can mirror between two servers if you specify URLs instead of directories. FXP is automatically used for transfers between FTP servers, if possible.

Some FTP servers hide dot-files by default (e.g. .htaccess), and show them only when LIST command is used with -a option. In such case try to use `set ftp:list-options -a’.

–depth-first, –no-empty-dirs and setting mirror:no-empty-dirs=true.

mkdir [-p] [-f] dir(s)

Make remote directories. If -p is used, make all components of paths. The -f option makes mkdir quiet and suppresses messages.

module module [ args ]

Load given module using dlopen(3) function. If module name does not contain a slash, it is searched in directories specified by module:path variable. Arguments are passed to module_init function. See README.modules for technical details.

more files

Same as `cat files | more’. if PAGER is set, it is used as filter. (See also cat, zcat and zmore)

mput [-c] [-d] [-a] [-E] [-e] [-P N] [-O base] files

Upload files with wildcard expansion. By default it uses the base name of local name as remote one. This can be changed by `-d’ option.

-ccontinue, reput
-dcreate directories the same as in file names and put the files into them instead of current directory
-Edelete source files after successful transfer (dangerous)
-edelete target file before the transfer
-ause ascii mode (binary is the default)
-P Nupload N files in parallel
-O <base>specifies base directory or URL where files should be placed

mrm file(s)

Same as `glob rm’. Removes specified file(s) with wildcard expansion.

mmv [-O directory] file(s) directory

Move specified files to a target directory. The target directory can be specified after -O option or as the last argument.

-O <dir>specifies the target directory where files should be placed

mv file1 file2

Rename file1 to file2. No wildcard exmapsion is performed. If you give more than two arguments, or the last argument ends with a slash, then mmv command is executed instead.

nlist [args]

List remote file names

open [OPTS] site

Select a server by host name, URL or bookmark. When an URL or bookmark is given, automatically change the current working directory to the directory of the URL. Options:

-e cmdexecute the command just after selecting the server
-u user[,pass]use the user/password for authentication
-p portuse the port for connection
-s slotassign the connection to this slot
-denable debug
-Bdon’t look up bookmarks
–user useruse the user for authentication
–password passuse the password for authentication
–env-passwordtake password from LFTP_PASSWORD environment variable
sitehost name, URL or bookmark name

pget [OPTS] rfile [-o lfile]

Gets the specified file using several connections. This can speed up transfer, but loads the net and server heavily impacting other users. Use only if you really have to transfer the file ASAP. Options:

-ccontinue transfer. Requires lfile.lftp-pget-status file.
-n maxconnset maximum number of connections (default is taken from pget:default-n setting)

put [-E] [-a] [-c] [-e] [-P N] [-O base] lfile [-o rfile]

Upload lfile with remote name rfile. If -o omitted, the base name of lfile is used as remote name. Does not expand wildcards, use mput for that.

-o <rfile>specifies remote file name (default – basename of lfile)
-ccontinue, reput. It requires permission to overwrite remote files
-Edelete source files after successful transfer (dangerous)
-edelete target file before the transfer
-ause ascii mode (binary is the default)
-P Nupload N files in parallel
-O <base>specifies base directory or URL where files should be placed

pwd [-p]

Print current remote URL. Use `-p’ option to show password in the URL.

queue [-n num ] cmd

Add the given command to queue for sequential execution. Each site has its own queue. `-n’ adds the command before the given item in the queue. Don’t try to queue `cd’ or `lcd’ commands, it may confuse lftp. Instead do the cd/lcd before `queue’ command, and it will remember the place in which the command is to be done. It is possible to queue up an already running job by `queue wait <jobno>’, but the job will continue execution even if it is not the first in queue.

`queue stop’ will stop the queue, it will not execute any new commands, but already running jobs will continue to run. You can use `queue stop’ to create an empty stopped queue. `queue start’ will resume queue execution. When you exit lftp, it will start all stopped queues automatically.

`queue’ with no arguments will either create a stopped queue or print queue status.

queue –delete|-d [index or wildcard expression]

Delete one or more items from the queue. If no argument is given, the last entry in the queue is deleted.

queue –move|-m <index or wildcard expression> [index]

Move the given items before the given queue index, or to the end if no destination is given.

-qBe quiet.
-vBe verbose.
-QOutput in a format that can be used to re-queue. Useful with –delete.

Examples:

> get file &
[1] get file
> queue wait 1
> queue get another_file
> cd a_directory
> queue get yet_another_file
queue -d 3Delete the third item in the queue.
queue -m 6 4Move the sixth item in the queue before the fourth.
queue -m "get*zip" 1Move all commands matching "get*zip" to the beginning of the queue. (The order of the items is preserved.)
queue -d "get*zip"Delete all commands matching "get*zip".

quote cmd

For FTP – send the command uninterpreted. Use with caution – it can lead to unknown remote state and thus will cause reconnect. You cannot be sure that any change of remote state because of quoted command is solid – it can be reset by reconnect at any time.

For HTTP – specific to HTTP action. Syntax: “quote <command> [<args>]”. Command may be “set-cookie” or “post”.

open http://www.site.net
quote set-cookie "variable=value; othervar=othervalue"
set http:post-content-type application/x-www-form-urlencoded
quote post /cgi-bin/script.cgi "var=value&othervar=othervalue" > local_file

For FISH – send the command uninterpreted. This can be used to execute arbitrary commands on server. The command must not take input or print ### at new line beginning. If it does, the protocol will become out of sync.

open fish://server
quote find -name \*.zip

reget rfile [-o lfile]

Same as `get -c’.

rels [args]

Same as `ls’, but ignores the cache.

renlist [args]

Same as `nlist’, but ignores the cache.

repeat [OPTS] [[-d] delay] [command]

Repeat specified command with a delay between iterations. Default delay is one second, default command is empty.

-c <count>maximum number of iterations
-d <delay>delay between iterations
–while-okstop when command exits with non-zero code
–until-okstop when command exits with zero code
–weakstop when lftp moves to background.

Examples:

repeat at tomorrow -- mirror
repeat 1d mirror

reput lfile [-o rfile]

Same as `put -c’.

rm [-r] [-f] files

Remove remote files. Does not expand wildcards, use mrm for that. -r is for recursive directory remove. Be careful, if something goes wrong you can lose files. -f suppress error messages.

rmdir dir(s)

Remove remote directories.

scache [session]

List cached sessions or switch to specified session.

set [var [val]]

Set variable to given value. If the value is omitted, unset the variable. Variable name has format “name/closure”, where closure can specify exact application of the setting. See below for details. If set is called with no variable then only altered settings are listed. It can be changed by options:

-alist all settings, including default values
-dlist only default values, not necessary current ones

site site_cmd

Execute site command site_cmd and output the result. You can redirect its output.

sleep interval

Sleep given time interval and exit. Interval is in seconds by default, but can be suffixed with ‘m’, ‘h’, ‘d’ for minutes, hours and days respectively. See also at.

slot [name]

Select specified slot or list all slots allocated. A slot is a connection to a server, somewhat like a virtual console. You can create multiple slots connected to different servers and switch between them. You can also use slot:name as a pseudo-URL evaluating to that slot location.

Default readline binding allows quick switching between slots named 0-9 using Meta-0 – Meta-9 keys (often you can use Alt instead of Meta).

source file
source -e command

Execute commands recorded in file file or returned by specified external command.

source ~/.lftp/rc
source -e echo help

suspend

Stop lftp process. Note that transfers will be also stopped until you continue the process with shell’s fg or bg commands.

torrent [OPTS] torrent-files…

Start BitTorrent process for the given torrent-files, which can be a local file, URL, magnet link or plain info_hash written in hex or base32. Local wildcards are expanded. Existing files are first validated unless –force-valid option is given. Missing pieces are downloaded. Files are stored in specified directory or current working directory by default. Seeding continues until ratio reaches torrent:stop-on-ratio setting or time of torrent:seed-max-time runs out.

Options:

-O <directory>specifies base directory where files should be placed
–force-validskip file validation (if you are sure they are ok).
–only-newstop if the metadata is known already or the torrent is complete.
–only-incompletestop if the torrent is already complete.
–dht-bootstrap=<node>bootstrap DHT by sending a query to specified node. This option should be used just once to fill the local node cache. Port number may be given after colon, default is 6881. Here are some nodes for bootstrapping: dht.transmissionbt.com, router.utorrent.com, router.bittorrent.com.
–shareshare specified file or directory using BitTorrent protocol. Magnet link is printed when it’s ready.

user user [pass]
user URL [pass]

Use specified info for remote login. If you specify an URL with user name, the entered password will be cached so that future URL references can use it.

version

Print lftp version.

wait [jobno]
wait all

Wait for specified job to terminate. If jobno is omitted, wait for last backgrounded job.

`wait all’ waits for all jobs to terminate.

zcat files

Same as cat, but filter each file through zcat. (See also cat, more and zmore)

zmore files

Same as more, but filter each file through zcat. (See also cat, zcat and more)

Settings

On startup, lftp executes ~/.lftprc and ~/.lftp/rc (or ~/.config/lftp/rc if ~/.lftp does not exist). You can place aliases and `set’ commands there. Some people prefer to see full protocol debug, use `debug’ to turn the debug on.

There is also a system-wide startup file in /etc/lftp.conf. It can be in different directory, see FILES section.

lftp has the following settable variables (you can also use `set -a’ to see all variables and their values):

bmk:save-passwords (boolean)
save plain text passwords in ~/.local/share/lftp/bookmarks or ~/.lftp/bookmarks on `bookmark add’ command. Off by default.
cache:cache-empty-listings (boolean)
When false, empty listings are not cached.
cache:enable (boolean)
When false, cache is disabled.
cache:expire (time interval)
Positive cache entries expire in this time interval.
cache:expire-negative (time interval)
Negative cache entries expire in this time interval.
cache:size (number)
Maximum cache size. When exceeded, oldest cache entries will be removed from cache.
cmd:at-exit (string)
the commands in string are executed before lftp exits or moves to background.
cmd:at-exit-bg (string)
the commands in string are executed before backgrounded lftp exits.
cmd:at-exit-fg (string)
the commands in string are executed before foreground lftp exits.
cmd:at-background (string)
the commands in string are executed before lftp moves to background.
cmd:at-terminate (string)
the commands in string are executed before lftp terminates (either backgrounded or foreground).
cmd:at-finish (string)
the commands in string are executed once when all jobs are done.
cmd:at-queue-finish (string)
the commands in string are executed once when all jobs in a queue are done.
cmd:cls-completion-default (string)
default cls options for displaying completion choices. For example, to make completion listings show file sizes, set cmd:cls-completion-default to `-s’.
cmd:cls-default (string)
default cls command options. They can be overridden by explicitly given options.
cmd:cls-exact-time (boolean)
when true, cls would try to get exact file modification time even if it means more requests to the server.
cmd:csh-history (boolean)
enables csh-like history expansion.
cmd:default-protocol (string)
The value is used when `open’ is used with just host name without protocol. Default is `ftp’.
cmd:fail-exit (boolean)
if true, exit when a command fails and the following command is unconditional (i.e. does not begin with || or &&). lftp exits after the unconditional command is issued without executing it.
cmd:interactive (tri-boolean)
when true, lftp acts interactively, handles terminal signals and outputs some extra messages. Default is auto and depends on stdin being a terminal.
cmd:long-running (seconds)
time of command execution, which is considered as `long’ and a beep is done before next prompt. 0 means off.
cmd:ls-default (string)
default ls argument
cmd:move-background (boolean)
when false, lftp refuses to go to background when exiting. To force it, use `exit bg’.
cmd:move-background-detach (boolean)
when true (default), lftp detaches itself from the control terminal when moving to background, it is possible to attach back using `attach’ command; when false, lftp tricks the shell to move lftp to background process group and continues to run, then fg shell command brings lftp back to foreground unless it has done all jobs and terminated.
cmd:prompt (string)
The prompt. lftp recognizes the following backslash-escaped special characters that are decoded as follows:
\@
insert @ if the current remote site user is not default

an ASCII bell character (07)

an ASCII escape character (033)
\h
the remote hostname you are connected to
newline
\s
the name of the client (lftp)
\S
current slot name