1lftp(1)                     General Commands Manual                    lftp(1)
2
3
4

NAME

6       lftp - Sophisticated file transfer program
7

SYNTAX

9       lftp [-d] [-e cmd] [-p port] [-u user[,pass]] [site]
10       lftp -f script_file
11       lftp -c commands
12       lftp --version
13       lftp --help
14
15

VERSION

17       This man page documents lftp version 4.8.1.
18
19

DESCRIPTION

21       lftp is a file transfer program that allows sophisticated FTP, HTTP and
22       other connections to other hosts. If site is specified then  lftp  will
23       connect  to that site otherwise a connection has to be established with
24       the open command.
25
26       lftp can handle several file access methods - FTP, FTPS,  HTTP,  HTTPS,
27       HFTP,  FISH, SFTP and file (HTTPS and FTPS are only available when lftp
28       is compiled with GNU TLS or  OpenSSL  library).  You  can  specify  the
29       method  to  use  in  `open  URL' command, e.g. `open http://www.us.ker
30       nel.org/pub/linux'. HFTP is ftp-over-http-proxy  protocol.  It  can  be
31       used   automatically   instead   of   FTP   if   ftp:proxy  is  set  to
32       `http://proxy[:port]'. Fish is a protocol working over an  ssh  connec‐
33       tion  to a unix account. SFtp is a protocol implemented in SSH2 as SFTP
34       subsystem.
35
36       Besides FTP-like protocols, lftp has support for BitTorrent protocol as
37       `torrent' command. Seeding is also supported.
38
39
40       Every  operation  in  lftp  is reliable, that is any non-fatal error is
41       handled properly and the  operation  is  repeated.  So  if  downloading
42       breaks,  it will be restarted from the point automatically. Even if FTP
43       server does not support the REST command, lftp will try to retrieve the
44       file from the very beginning until the file is transferred completely.
45
46       lftp  has shell-like command syntax allowing you to launch several com‐
47       mands in parallel in background (&). It is also possible to group  com‐
48       mands within () and execute them in background. All background jobs are
49       executed in the same single process. You can bring a foreground job  to
50       background with ^Z (c-z) and back with command `wait' (or `fg' which is
51       alias to `wait'). To list running jobs, use command `jobs'.  Some  com‐
52       mands allow redirecting their output (cat, ls, ...) to file or via pipe
53       to external command. Commands can be executed  conditionally  based  on
54       termination status of previous command (&&, ||).
55
56       If  you  exit lftp before all jobs are not finished yet, lftp will move
57       itself to nohup mode in background. The same thing happens with a  real
58       modem hangup or when you close an xterm.
59
60       lftp has built-in mirror which can download or update a whole directory
61       tree. There is also reverse mirror (mirror -R) which uploads or updates
62       a  directory  tree  on  server. Mirror can also synchronize directories
63       between two remote servers, using FXP if available.
64
65       There is command `at' to launch a job at specified time in current con‐
66       text,  command  `queue'  to queue commands for sequential execution for
67       current server, and much more.
68
69       On  startup,  lftp  executes  /etc/lftp.conf  and  then  ~/.lftprc  and
70       ~/.lftp/rc  (or  ~/.config/lftp/rc if ~/.lftp does not exist).  You can
71       place aliases and `set' commands there. Some people prefer to see  full
72       protocol  debug, use `debug' to turn the debug on. Use `debug 3' to see
73       only greeting messages and error messages.
74
75       lftp has a number of settable variables. You can use `set  -a'  to  see
76       all  variables  and  their  values or `set -d' to see list of defaults.
77       Variable names can be abbreviated and prefix can be omitted unless  the
78       rest becomes ambiguous.
79
80       If  lftp  was  compiled  with  OpenSSL  (configure  --with-openssl)  it
81       includes software developed by the  OpenSSL  Project  for  use  in  the
82       OpenSSL Toolkit. (http://www.openssl.org/)
83
84
85   Commands
86       ! shell command
87
88       Launch shell or shell command.
89
90              !ls
91
92       To do a directory listing of the local host.
93
94       alias  [name [value]]
95
96       Define  or undefine alias name. If value is omitted, the alias is unde‐
97       fined, else it takes the value value. If no argument is given the  cur‐
98       rent aliases are listed.
99
100              alias dir ls -lF
101              alias less zmore
102
103       at time [ -- command ]
104
105       Wait  until  the  given  time and execute given (optional) command. See
106       also at(1).
107
108       attach  [PID]
109
110       Attach the terminal to specified backgrounded lftp process.
111
112       bookmark  [subcommand]
113
114       The bookmark command controls bookmarks.
115
116       Site names can be used in the open command directly  as-is  or  in  any
117       command that accepts input URLs using the bm:site/path format.
118
119              add <name> [<loc>]   add  current  place  or  given  location to
120                                   bookmarks and bind to given name
121              del <name>           remove bookmark with name
122              edit                 start editor on bookmarks file
123              import <type>        import foreign bookmarks
124              list                 list bookmarks (default)
125
126       cache  [subcommand]
127
128       The cache command controls local memory cache.  The  following  subcom‐
129       mands are recognized:
130
131       stat        print cache status (default)
132
133       on|off      turn on/off caching
134       flush       flush cache
135       size lim    set memory limit, -1 means unlimited
136       expire Nx   set  cache expiration time to N seconds (x=s) minutes (x=m)
137                   hours (x=h) or days (x=d)
138
139       cat files
140
141       cat outputs the remote file(s) to stdout.  (See  also  more,  zcat  and
142       zmore)
143
144       cd rdir
145
146       Change  current  remote  directory.   The  previous remote directory is
147       stored as `-'. You can do `cd -' to change  the  directory  back.   The
148       previous  directory for each site is also stored on disk, so you can do
149       `open site; cd -' even after lftp restart.
150
151       chmod [OPTS] mode files...
152
153       Change permission mask on remote files. The mode can be an octal number
154       or a symbolic mode (see chmod(1)).
155
156              -c, --changes     like verbose but report only when a change is made
157              -f, --quiet       suppress most error messages
158              -v, --verbose     output a diagnostic for every file processed
159              -R, --recursive   change files and directories recursively
160
161       close [-a]
162
163       Close  idle  connections.  By default only with the current server, use
164       -a to close all idle connections.
165
166       cls [OPTS] files...
167
168       `cls' tries to retrieve information about specified files  or  directo‐
169       ries  and outputs the information according to format options. The dif‐
170       ference between `ls' and `cls' is that `ls' requests the server to for‐
171       mat file listing, and `cls' formats it itself, after retrieving all the
172       needed information.
173
174              -1                         single-column output
175              -a, --all                  show dot files
176              -B, --basename             show basename of files only
177                  --block-size=SIZ       use SIZ-byte blocks
178              -d, --directory            list  directory  entries  instead  of
179                                         contents
180              -F, --classify             append   indicator  (one  of  /@)  to
181                                         entries
182              -h, --human-readable       print sizes in human readable  format
183                                         (e.g., 1K)
184                  --si                   likewise,  but use powers of 1000 not
185                                         1024
186              -k, --kilobytes            like --block-size=1024
187              -l, --long                 use a long listing format
188              -q, --quiet                don't show status
189              -s, --size                 print size of each file
190                  --filesize             if printing size, only print size for
191                                         files
192              -i, --nocase               case-insensitive pattern matching
193              -I, --sortnocase           sort names case-insensitively
194              -D, --dirsfirst            list directories first
195                  --sort=OPT             "name", "size", "date"
196              -S                         sort by file size
197                  --user, --group,
198
199                  --perms, --date,
200                  --linkcount, --links   show individual fields
201                  --time-style=STYLE     use specified time format
202
203       command cmd args...
204
205       execute given command ignoring aliases.
206
207       debug [OPTS] level|off
208
209       Switch debugging to level or turn it off. Options:
210
211              -T        truncate output file
212              -o <file> redirect debug output to the file
213              -c        show message context
214              -p        show PID
215              -t        show timestamps
216
217       du [OPTS] path...
218
219       Summarize disk usage. Options:
220
221              -a, --all              write  counts  for  all  files,  not just
222                                     directories
223                  --block-size=SIZ   use SIZ-byte blocks
224              -b, --bytes            print size in bytes
225              -c, --total            produce a grand total
226              -d, --max-depth=N      print the total for a directory (or file,
227                                     with --all) only if it is N or fewer lev‐
228                                     els  below  the  command  line  argument;
229                                     --max-depth=0 is the same as --summarize
230              -F, --files            print number of files instead of sizes
231              -h, --human-readable   print  sizes  in  human  readable  format
232                                     (e.g., 1K 234M 2G)
233              -H, --si               likewise, but use powers of 1000 not 1024
234              -k, --kilobytes        like --block-size=1024
235              -m, --megabytes        like --block-size=1048576
236              -S, --separate-dirs    do not include size of subdirectories
237              -s, --summarize        display only a total for each argument
238                  --exclude=PAT      exclude files that match PAT
239
240       echo [-n] string
241
242       Prints (echos) the given string to the display.
243
244       edit [OPTS] file
245
246       Retrieve remote file to a temporary location, run a local editor on  it
247       and upload the file back if changed. Options:
248
249              -k        keep the temporary file
250              -o <temp> explicit temporary file location
251
252       eval [-f format ] args...
253
254       without -f it executes given arguments as a command. With -f, arguments
255       are transformed into a new command. The format can contain  plain  text
256       and placeholders $0...$9 and $@, corresponding to the arguments.
257
258       exit [bg] [top] [parent] [kill] [code]
259
260       exit  will  exit  from  lftp  or move to background if there are active
261       jobs. If no job is active, code is passed to operating system as lftp's
262       termination  status.  If code is omitted, the exit code of last command
263       is used.
264
265       `exit bg' forces  moving  to  background  when  cmd:move-background  is
266       false.   `exit  top'  makes  top  level  `shell' (internal lftp command
267       executor) terminate.  `exit parent' terminates the  parent  shell  when
268       running  a  nested  script.  `exit kill' kills all numbered jobs before
269       exiting. The options can be combined, e.g.  `at 08:00 -- exit top  kill
270       &' kills all jobs and makes lftp exit at specified time.
271
272       fg
273
274       Alias for `wait'.
275
276       find [OPTS] directory...
277
278       List files in the directory (current directory by default) recursively.
279       This can help with servers lacking ls -R support. You can redirect out‐
280       put of this command. Options:
281
282              -d MD, --max-depth=MD   specify maximum scan depth
283              -l,    --ls             use long listing format
284
285       ftpcopy
286
287       Obsolete. Use one of the following instead:
288              get ftp://... -o ftp://...
289              get -O ftp://... file1 file2...
290              put ftp://...
291              mput ftp://.../*
292              mget -O ftp://... ftp://.../*
293       or  other  combinations  to  get FXP transfer (directly between two FTP
294       servers).  lftp would fallback to plain copy (via client) if FXP trans‐
295       fer cannot be initiated or ftp:use-fxp is false.
296
297       get [-E] [-a] [-c] [-e] [-P N] [-O base] rfile [-o lfile] ...
298
299       Retrieve  the  remote  file rfile and store it as the local file lfile.
300       If -o is omitted, the file is stored to local file named as  base  name
301       of  rfile.  You can get multiple files by specifying multiple instances
302       of rfile (and -o lfile). Does not expand wildcards, use mget for that.
303
304              -c          continue, reget
305              -E          delete source files after successful transfer
306              -e          delete target file before the transfer
307              -a          use ascii mode (binary is the default)
308              -P N        download N files in parallel
309              -O <base>   specifies base directory or URL where  files  should
310                          be placed
311
312       Examples:
313              get README
314              get README -o debian.README
315              get README README.mirrors
316              get README -o debian.README README.mirrors -o debian.mirrors
317              get README -o ftp://some.host.org/debian.README
318              get README -o ftp://some.host.org/debian-dir/   (end slash is important)
319
320       get1 [OPTS] rfile
321
322       Transfer a single file. Options:
323
324              -o <lfile>                  destination  file name (default - base‐
325                                          name of rfile)
326              -c                          continue, reget
327              -E                          delete source  files  after  successful
328                                          transfer
329              -a                          use ascii mode (binary is the default)
330
331              -d                          create the directory of the target file
332              --source-region=<from-to>   transfer  specified  region  of  source
333                                          file
334              --target-position=<pos>     position in target file to  write  data
335                                          at
336
337       glob  [OPTS] [command] patterns
338
339       Glob  given patterns containing metacharacters and pass result to given
340       command or return appropriate exit code.
341
342              -f            plain files (default)
343              -d            directories
344              -a            all types
345              --exist       return zero exit code when the patterns expand to non-empty list
346              --not-exist   return zero exit code when the patterns expand to an empty list
347
348       Examples:
349              glob echo *
350              glob --exist *.csv && echo "There are *.csv files"
351
352       help [cmd]
353
354       Print help for cmd or if no cmd was specified print a list of available
355       commands.
356
357       history [OPTS] [cnt]
358
359       View  or  manipulate the command history.  Optional argument cnt speci‐
360       fies the number of history lines to list, or "all" to list all entries.
361       Options:
362
363              -w <file> Write history to file.
364              -r <file> Read history from file; appends to current history.
365              -c        Clear the history.
366              -l        List the history (default).
367
368       jobs [OPTS] [job_no...]
369
370       List  running  jobs.  If job_no is specified, only list a job with that
371       number.  Options:
372
373              -v   verbose, several -v increase verbosity
374              -r   list just one specified job without recursion
375
376       kill all|job_no
377
378       Delete specified job with job_no or all jobs.  (For job_no see jobs)
379
380       lcd ldir
381
382       Change current local directory ldir. The previous  local  directory  is
383       stored as `-'. You can do `lcd -' to change the directory back.
384
385       ln [-s] existing-file new-link
386
387       Make  a hard/symbolic link to an existing file.  Option -s selects cre‐
388       ation of a symbolic link.
389
390       local command
391
392       Run specified command with local directory file:// session  instead  of
393       remote session. Examples:
394              local pwd
395              local ls
396              local mirror /dir1 /dir2
397
398       lpwd
399
400       Print current working directory on local machine.
401
402       ls params
403
404       List  remote  files. You can redirect output of this command to file or
405       via pipe to external command.  By default, ls output is cached, to  see
406       new listing use rels or cache flush.
407
408       mget [-c] [-d] [-a] [-E] [-e] [-P N] [-O base] files
409
410       Gets selected files with expanded wildcards.
411
412              -c          continue, reget.
413              -d          create  directories  the  same as file names and get
414                          the files into them instead of current directory.
415              -E          delete source files after successful transfer
416              -e          delete target file before the transfer
417              -a          use ascii mode (binary is the default)
418              -P N        download N files in parallel
419              -O <base>   specifies base directory or URL where  files  should
420                          be placed
421
422       mirror [OPTS] [source [target]]
423
424       Mirror specified source directory to the target directory.
425
426       By  default  the  source is remote and the target is a local directory.
427       When using -R, the source directory is local and the target is  remote.
428       If  the  target directory is omitted, base name of the source directory
429       is used.  If both directories are omitted,  current  local  and  remote
430       directories are used.
431
432       The source and/or the target may be URLs pointing to directories.
433
434       If  the  target directory ends with a slash (except the root directory)
435       then base name of the source directory is appended.
436
437              -c,      --continue                 continue  a  mirror  job  if
438                                                  possible
439              -e,      --delete                   delete  files not present at
440                                                  the source
441                       --delete-excluded          delete files excluded at the
442                                                  target
443                       --delete-first             delete   old   files  before
444                                                  transferring new ones
445                       --depth-first              descend into  subdirectories
446                                                  before transferring files
447                       --scan-all-first           scan  all directories recur‐
448                                                  sively  before  transferring
449                                                  files
450              -s,      --allow-suid               set suid/sgid bits according
451                                                  to the source
452                       --allow-chown              try to set owner  and  group
453                                                  on files
454                       --ascii                    use   ascii  mode  transfers
455                                                  (implies --ignore-size)
456                       --ignore-time              ignore  time  when  deciding
457                                                  whether to download
458                       --ignore-size              ignore  size  when  deciding
459                                                  whether to download
460                       --only-missing             download only missing files
461
462
463                       --only-existing            download only files  already
464                                                  existing at target
465              -n,      --only-newer               download  only  newer  files
466                                                  (-c won't work)
467                       --upload-older             upload even files older than
468                                                  the target ones
469                       --transfer-all             transfer   all  files,  even
470                                                  seemingly the  same  at  the
471                                                  target site
472                       --no-empty-dirs            don't  create empty directo‐
473                                                  ries (implies --depth-first)
474              -r,      --no-recursion             don't go to subdirectories
475                       --recursion=MODE           go to  subdirectories  on  a
476                                                  condition
477                       --no-symlinks              don't create symbolic links
478              -p,      --no-perms                 don't set file permissions
479                       --no-umask                 don't  apply  umask  to file
480                                                  modes
481              -R,      --reverse                  reverse mirror (put files)
482              -L,      --dereference              download symbolic  links  as
483                                                  files
484                       --overwrite                overwrite  plain files with‐
485                                                  out removing them first
486                       --no-overwrite             remove and  re-create  plain
487                                                  files instead of overwriting
488              -N,      --newer-than=SPEC          download  only  files  newer
489                                                  than specified time
490                       --older-than=SPEC          download  only  files  older
491                                                  than specified time
492                       --size-range=RANGE         download   only  files  with
493                                                  size in specified range
494              -P,      --parallel[=N]             download N files in parallel
495                       --use-pget[-n=N]           use pget to  transfer  every
496                                                  single file
497                       --on-change=CMD            execute  the command if any‐
498                                                  thing has been changed
499                       --loop                     repeat   mirror   until   no
500                                                  changes found
501              -i RX,   --include=RX               include matching files
502              -x RX,   --exclude=RX               exclude matching files
503              -I GP,   --include-glob=GP          include matching files
504              -X GP,   --exclude-glob=GP          exclude matching files
505                       --include-rx-from=FILE
506                       --exclude-rx-from=FILE
507                       --include-glob-from=FILE
508                       --exclude-glob-from=FILE   load   include/exclude  pat‐
509                                                  terns from the file, one per
510                                                  line
511              -f FILE, --file=FILE                mirror   a  single  file  or
512                                                  globbed     group      (e.g.
513                                                  /path/to/*.txt)
514              -F DIR,  --directory=DIR            mirror a single directory or
515                                                  globbed     group      (e.g.
516                                                  /path/to/dir*)
517              -O DIR,  --target-directory=DIR     target base path or URL
518              -v,      --verbose[=level]          verbose operation
519                       --log=FILE                 write  lftp  commands  being
520                                                  executed to FILE
521                       --script=FILE              write lftp commands to FILE,
522                                                  but don't execute them
523                       --just-print, --dry-run    same as --script=-
524                       --max-errors=N             stop  after  this  number of
525                                                  errors
526                       --skip-noaccess            don't try to transfer  files
527                                                  with no read access.
528
529                       --use-cache                use  cached  directory list‐
530                                                  ings
531                       --Remove-source-files      remove  source  files  after
532                                                  transfer (use with caution)
533                       --Remove-source-dirs       remove   source   files  and
534                                                  directories  after  transfer
535                                                  (use   with  caution).   Top
536                                                  level   directory   is   not
537                                                  removed  if  it's  name ends
538                                                  with a slash.
539                       --Move                     same as --Remove-source-dirs
540              -a                                  same    as     --allow-chown
541                                                  --allow-suid --no-umask
542       RX is an extended regular expression, just like in egrep(1).
543
544       GP is a glob pattern, e.g. `*.zip'.
545
546       Include  and  exclude options can be specified multiple times. It means
547       that a file or directory would be mirrored if it matches an include and
548       does  not  match  to excludes after the include, or does not match any‐
549       thing and the first check is exclude. Directories are  matched  with  a
550       slash appended.
551
552       Note  that  symbolic  links  are  not  created when uploading to remote
553       server, because FTP protocol cannot do it. To upload  files  the  links
554       refer to, use `mirror -RL' command (treat symbolic links as files).
555
556       For options --newer-than and --older-than you can either specify a file
557       or  time  specification  like  that  used  by   at(1)   command,   e.g.
558       `now-7days'  or  `week  ago'.  If you specify a file, then modification
559       time of that file will be used.
560
561       Verbosity level can be selected using --verbose=level option or by sev‐
562       eral -v options, e.g. -vvv. Levels are:
563              0 - no output (default)
564              1 - print actions
565              2 - +print not deleted file names (when -e is not specified)
566              3 - +print directory names which are mirrored
567
568       --only-newer  turns off file size comparison and uploads/downloads only
569       newer files even if size is  different.  By  default  older  files  are
570       transferred and replace newer ones.
571
572       --upload-older  allows  replacing  newer  remote  files with older ones
573       (when the target side is remote). Some remote back-ends cannot preserve
574       timestamps so the default is to keep newer files.
575
576       Recursion  mode  can  be  one of `always', `never', `missing', `newer'.
577       With the option `newer' mirror compares timestamps of  directories  and
578       enters  a  directory only if it is older or missing on the target side.
579       Be aware that when a file changes the directory timestamp may stay  the
580       same, so mirror won't process that directory.
581
582       The  options --file and --directory may be used multiple times and even
583       mixed provided that base directories of the paths are the same.
584
585       You can mirror between two servers  if  you  specify  URLs  instead  of
586       directories.   FXP  is  automatically  used  for  transfers between FTP
587       servers, if possible.
588
589       Some FTP servers hide dot-files by default (e.g. .htaccess),  and  show
590       them only when LIST command is used with -a option. In such case try to
591       use `set ftp:list-options -a'.
592
593       The   recursion   modes   `newer'   and   `missing'    conflict    with
594       --scan-all-first,   --depth-first,  --no-empty-dirs  and  setting  mir‐
595       ror:no-empty-dirs=true.
596
597       mkdir [-p] [-f] dir(s)
598
599       Make remote directories. If -p is used, make all components  of  paths.
600       The -f option makes mkdir quiet and suppresses messages.
601
602       module module [ args ]
603
604       Load  given  module  using  dlopen(3) function. If module name does not
605       contain a slash, it is searched in directories specified by module:path
606       variable.    Arguments   are   passed   to  module_init  function.  See
607       README.modules for technical details.
608
609       more files
610
611       Same as `cat files | more'. if PAGER is set,  it  is  used  as  filter.
612       (See also cat, zcat and zmore)
613
614       mput [-c] [-d] [-a] [-E] [-e] [-P N] [-O base] files
615
616       Upload  files with wildcard expansion. By default it uses the base name
617       of local name as remote one. This can be changed by `-d' option.
618
619              -c          continue, reput
620              -d          create directories the same as in file names and put
621                          the files into them instead of current directory
622              -E          delete  source files after successful transfer (dan‐
623                          gerous)
624              -e          delete target file before the transfer
625              -a          use ascii mode (binary is the default)
626              -P N        upload N files in parallel
627              -O <base>   specifies base directory or URL where  files  should
628                          be placed
629
630       mrm file(s)
631
632       Same as `glob rm'. Removes specified file(s) with wildcard expansion.
633
634       mmv [-O directory] file(s) directory
635
636       Move specified files to a target directory. The target directory can be
637       specified after -O option or as the last argument.
638
639              -O <dir>   specifies the target directory where files should  be
640                         placed
641
642       mv file1 file2
643
644       Rename file1 to file2. No wildcard exmapsion is performed.  If you give
645       more than two arguments, or the last argument ends with a  slash,  then
646       mmv command is executed instead.
647
648       nlist [args]
649
650       List remote file names
651
652       open [OPTS] site
653
654       Select  a server by host name, URL or bookmark. When an URL or bookmark
655       is given, automatically change the current  working  directory  to  the
656       directory of the URL.  Options:
657
658              -e cmd            execute the command just after selecting the server
659              -u user[,pass]    use the user/password for authentication
660
661              -p port           use the port for connection
662              -s slot           assign the connection to this slot
663              -d                enable debug
664              -B                don't look up bookmarks
665              --user user       use the user for authentication
666              --password pass   use the password for authentication
667              --env-password    take password from LFTP_PASSWORD environment variable
668              site              host name, URL or bookmark name
669
670       pget [OPTS] rfile [-o lfile]
671
672       Gets  the  specified  file using several connections. This can speed up
673       transfer, but loads the net and server heavily impacting  other  users.
674       Use only if you really have to transfer the file ASAP.  Options:
675
676              -c           continue  transfer. Requires lfile.lftp-pget-status
677                           file.
678              -n maxconn   set maximum number of connections (default is taken
679                           from pget:default-n setting)
680
681       put [-E] [-a] [-c] [-e] [-P N] [-O base] lfile [-o rfile]
682
683       Upload  lfile  with  remote name rfile. If -o omitted, the base name of
684       lfile is used as remote name. Does not expand wildcards, use  mput  for
685       that.
686
687              -o <rfile>   specifies  remote  file name (default - basename of
688                           lfile)
689              -c           continue, reput. It requires  permission  to  over‐
690                           write remote files
691              -E           delete source files after successful transfer (dan‐
692                           gerous)
693              -e           delete target file before the transfer
694              -a           use ascii mode (binary is the default)
695              -P N         upload N files in parallel
696              -O <base>    specifies base directory or URL where files  should
697                           be placed
698
699       pwd [-p]
700
701       Print current remote URL. Use `-p' option to show password in the URL.
702
703       queue [-n num ] cmd
704
705       Add  the given command to queue for sequential execution. Each site has
706       its own queue. `-n' adds the command  before  the  given  item  in  the
707       queue.  Don't try to queue `cd' or `lcd' commands, it may confuse lftp.
708       Instead do the cd/lcd before `queue' command, and it will remember  the
709       place in which the command is to be done. It is possible to queue up an
710       already running job by `queue wait <jobno>', but the job will  continue
711       execution even if it is not the first in queue.
712
713       `queue stop' will stop the queue, it will not execute any new commands,
714       but already running jobs will continue to run. You can use `queue stop'
715       to  create an empty stopped queue. `queue start' will resume queue exe‐
716       cution.  When you exit lftp, it will start all stopped queues automati‐
717       cally.
718
719       `queue'  with  no arguments will either create a stopped queue or print
720       queue status.
721
722       queue --delete|-d [index or wildcard expression]
723
724       Delete one or more items from the queue. If no argument is  given,  the
725       last entry in the queue is deleted.
726
727       queue --move|-m <index or wildcard expression> [index]
728
729       Move  the given items before the given queue index, or to the end if no
730       destination is given.
731
732              -q   Be quiet.
733              -v   Be verbose.
734              -Q   Output in a format that can be  used  to  re-queue.  Useful
735                   with --delete.
736
737       Examples:
738              > get file &
739              [1] get file
740              > queue wait 1
741              > queue get another_file
742              > cd a_directory
743              > queue get yet_another_file
744
745              queue -d 3             Delete the third item in the queue.
746              queue -m 6 4           Move  the  sixth item in the queue before
747                                     the fourth.
748              queue -m "get*zip" 1   Move all commands matching  "get*zip"  to
749                                     the  beginning  of the queue.  (The order
750                                     of the items is preserved.)
751              queue -d "get*zip"     Delete all commands matching "get*zip".
752
753       quote cmd
754
755       For FTP - send the command uninterpreted. Use with  caution  -  it  can
756       lead  to unknown remote state and thus will cause reconnect. You cannot
757       be sure that any change of remote state because of  quoted  command  is
758       solid - it can be reset by reconnect at any time.
759
760       For   HTTP  -  specific  to  HTTP  action.  Syntax:  ``quote  <command>
761       [<args>]''.  Command may be ``set-cookie'' or ``post''.
762              open http://www.site.net
763              quote set-cookie "variable=value; othervar=othervalue"
764              set http:post-content-type application/x-www-form-urlencoded
765              quote post /cgi-bin/script.cgi "var=value&othervar=othervalue" > local_file
766
767       For FISH - send the command uninterpreted. This can be used to  execute
768       arbitrary  commands on server. The command must not take input or print
769       ### at new line beginning. If it does, the protocol will become out  of
770       sync.
771              open fish://server
772              quote find -name \*.zip
773
774       reget rfile [-o lfile]
775
776       Same as `get -c'.
777
778       rels [args]
779
780       Same as `ls', but ignores the cache.
781
782       renlist [args]
783
784       Same as `nlist', but ignores the cache.
785
786       repeat [OPTS] [[-d] delay] [command]
787
788       Repeat  specified  command  with  a  delay between iterations.  Default
789       delay is one second, default command is empty.
790
791              -c <count>    maximum number of iterations
792
793              -d <delay>    delay between iterations
794              --while-ok    stop when command exits with non-zero code
795              --until-ok    stop when command exits with zero code
796              --weak        stop when lftp moves to background.
797
798       Examples:
799              repeat at tomorrow -- mirror
800              repeat 1d mirror
801
802       reput lfile [-o rfile]
803
804       Same as `put -c'.
805
806       rm [-r] [-f] files
807
808       Remove remote files.  Does not expand wildcards, use mrm for  that.  -r
809       is  for recursive directory remove. Be careful, if something goes wrong
810       you can lose files. -f suppress error messages.
811
812       rmdir dir(s)
813
814       Remove remote directories.
815
816       scache [session]
817
818       List cached sessions or switch to specified session.
819
820       set [var [val]]
821
822       Set variable to given value. If the value is omitted, unset  the  vari‐
823       able.   Variable  name  has  format ``name/closure'', where closure can
824       specify exact application of the setting. See below  for  details.   If
825       set  is  called with no variable then only altered settings are listed.
826       It can be changed by options:
827
828              -a   list all settings, including default values
829              -d   list only default values, not necessary current ones
830
831       site site_cmd
832
833       Execute site command site_cmd and output the result.  You can  redirect
834       its output.
835
836       sleep interval
837
838       Sleep  given time interval and exit. Interval is in seconds by default,
839       but can be suffixed with 'm', 'h', 'd'  for  minutes,  hours  and  days
840       respectively.  See also at.
841
842       slot [name]
843
844       Select  specified slot or list all slots allocated. A slot is a connec‐
845       tion to a server, somewhat like a virtual console. You can create  mul‐
846       tiple slots connected to different servers and switch between them. You
847       can also use slot:name as a pseudo-URL evaluating to  that  slot  loca‐
848       tion.
849
850       Default readline binding allows quick switching between slots named 0-9
851       using Meta-0 - Meta-9 keys (often you can use Alt instead of Meta).
852
853       source file
854       source -e command
855
856       Execute commands recorded in file file or returned by specified  exter‐
857       nal command.
858              source ~/.lftp/rc
859              source -e echo help
860
861       suspend
862
863       Stop  lftp  process. Note that transfers will be also stopped until you
864       continue the process with shell's fg or bg commands.
865
866       torrent [OPTS] torrent-files...
867
868       Start BitTorrent process for the given torrent-files, which  can  be  a
869       local  file,  URL,  magnet  link  or  plain info_hash written in hex or
870       base32.  Local wildcards are expanded. Existing files are  first  vali‐
871       dated  unless  --force-valid  option is given. Missing pieces are down‐
872       loaded. Files are stored in  specified  directory  or  current  working
873       directory  by  default.  Seeding  continues  until  ratio  reaches tor‐
874       rent:stop-on-ratio setting or time of torrent:seed-max-time runs out.
875
876       Options:
877
878              -O <directory>           specifies base  directory  where  files
879                                       should be placed
880              --force-valid            skip  file  validation (if you are sure
881                                       they are ok).
882              --only-new               stop if the metadata is  known  already
883                                       or the torrent is complete.
884              --only-incomplete        stop  if  the  torrent  is already com‐
885                                       plete.
886              --dht-bootstrap=<node>   bootstrap DHT by  sending  a  query  to
887                                       specified  node.  This option should be
888                                       used just once to fill the  local  node
889                                       cache.   Port number may be given after
890                                       colon, default is 6881.  Here are  some
891                                       nodes  for bootstrapping: dht.transmis‐
892                                       sionbt.com,        router.utorrent.com,
893                                       router.bittorrent.com.
894              --share                  share specified file or directory using
895                                       BitTorrent  protocol.  Magnet  link  is
896                                       printed when it's ready.
897
898       user user [pass]
899       user URL [pass]
900
901       Use  specified  info  for remote login. If you specify an URL with user
902       name, the entered password will be cached so that future URL references
903       can use it.
904
905       version
906
907       Print lftp version.
908
909       wait [jobno]
910       wait all
911
912       Wait for specified job to terminate. If jobno is omitted, wait for last
913       backgrounded job.
914
915       `wait all' waits for all jobs to terminate.
916
917       zcat files
918
919       Same as cat, but filter each file through zcat. (See also cat, more and
920       zmore)
921
922       zmore files
923
924       Same  as  more,  but filter each file through zcat. (See also cat, zcat
925       and more)
926
927
928   Settings
929       On  startup,  lftp  executes  ~/.lftprc  and  ~/.lftp/rc  (or   ~/.con‐
930       fig/lftp/rc  if  ~/.lftp  does  not  exist).  You can place aliases and
931       `set' commands there. Some people prefer to see  full  protocol  debug,
932       use `debug' to turn the debug on.
933
934       There  is also a system-wide startup file in /etc/lftp.conf.  It can be
935       in different directory, see FILES section.
936
937       lftp has the following settable variables (you can also use `set -a' to
938       see all variables and their values):
939
940       bmk:save-passwords (boolean)
941              save  plain  text  passwords in ~/.local/share/lftp/bookmarks or
942              ~/.lftp/bookmarks on `bookmark add' command.  Off by default.
943
944       cache:cache-empty-listings (boolean)
945              When false, empty listings are not cached.
946
947       cache:enable (boolean)
948              When false, cache is disabled.
949
950       cache:expire (time interval)
951              Positive cache entries expire in this time interval.
952
953       cache:expire-negative (time interval)
954              Negative cache entries expire in this time interval.
955
956       cache:size (number)
957              Maximum cache size. When exceeded, oldest cache entries will  be
958              removed from cache.
959
960       cmd:at-exit (string)
961              the  commands  in string are executed before lftp exits or moves
962              to background.
963
964       cmd:at-exit-bg (string)
965              the commands in string are  executed  before  backgrounded  lftp
966              exits.
967
968       cmd:at-exit-fg (string)
969              the  commands  in  string  are  executed  before foreground lftp
970              exits.
971
972       cmd:at-background (string)
973              the commands in string are executed before lftp moves  to  back‐
974              ground.
975
976       cmd:at-terminate (string)
977              the  commands  in  string  are  executed  before lftp terminates
978              (either backgrounded or foreground).
979
980       cmd:at-finish (string)
981              the commands in string are executed once when all jobs are done.
982
983       cmd:at-queue-finish (string)
984              the commands in string are executed once  when  all  jobs  in  a
985              queue are done.
986
987       cmd:cls-completion-default (string)
988              default cls options for displaying completion choices. For exam‐
989              ple, to make completion listings show file sizes,  set  cmd:cls-
990              completion-default to `-s'.
991
992       cmd:cls-default (string)
993              default  cls  command options. They can be overridden by explic‐
994              itly given options.
995
996       cmd:cls-exact-time (boolean)
997              when true, cls would try to get  exact  file  modification  time
998              even if it means more requests to the server.
999
1000       cmd:csh-history (boolean)
1001              enables csh-like history expansion.
1002
1003       cmd:default-protocol (string)
1004              The  value is used when `open' is used with just host name with‐
1005              out protocol. Default is `ftp'.
1006
1007       cmd:fail-exit (boolean)
1008              if true, exit when a command fails and the following command  is
1009              unconditional  (i.e.  does  not begin with || or &&). lftp exits
1010              after the unconditional command is issued without executing it.
1011
1012       cmd:interactive (tri-boolean)
1013              when true, lftp acts interactively, handles terminal signals and
1014              outputs  some  extra  messages.  Default  is auto and depends on
1015              stdin being a terminal.
1016
1017       cmd:long-running (seconds)
1018              time of command execution, which is considered as `long'  and  a
1019              beep is done before next prompt. 0 means off.
1020
1021       cmd:ls-default (string)
1022              default ls argument
1023
1024       cmd:move-background (boolean)
1025              when  false,  lftp  refuses to go to background when exiting. To
1026              force it, use `exit bg'.
1027
1028       cmd:move-background-detach (boolean)
1029              when true (default), lftp detaches itself from the control  ter‐
1030              minal  when  moving to background, it is possible to attach back
1031              using `attach' command; when false, lftp  tricks  the  shell  to
1032              move lftp to background process group and continues to run, then
1033              fg shell command brings lftp back to foreground  unless  it  has
1034              done all jobs and terminated.
1035
1036       cmd:prompt (string)
1037              The prompt. lftp recognizes the following backslash-escaped spe‐
1038              cial characters that are decoded as follows:
1039              \@     insert @ if the current remote site user is not default
1040              \a     an ASCII bell character (07)
1041              \e     an ASCII escape character (033)
1042              \h     the remote hostname you are connected to
1043              \n     newline
1044              \s     the name of the client (lftp)
1045              \S     current slot name
1046              \u     the username of the remote site user you are logged in as
1047              \U     the     URL     of     the     remote     site     (e.g.,
1048                     ftp://g437.ub.gu.se/home/james/src/lftp)
1049              \v     the version of lftp (e.g., 2.0.3)
1050              \w     the current working directory at the remote site
1051              \W     the  base  name  of  the current working directory at the
1052                     remote site
1053              \l     the current working directory at the local site
1054              \L     the base name of the current  working  directory  at  the
1055                     local site
1056              \nnn   the character corresponding to the octal number nnn
1057              \\     a backslash
1058              \?     skips next character if previous substitution was empty.
1059              \[     begin  a sequence of non-printing characters, which could
1060                     be used to embed a terminal  control  sequence  into  the
1061                     prompt
1062              \]     end a sequence of non-printing characters
1063
1064
1065       cmd:parallel (number)
1066              Number  of  jobs  run  in  parallel in non-interactive mode. For
1067              example, this may be useful for scripts with multiple `get' com‐
1068              mands.  Note that setting this to a value greater than 1 changes
1069              conditional execution behaviour, basically  makes  it  inconsis‐
1070              tent.
1071
1072       cmd:queue-parallel (number)
1073              Number of jobs run in parallel in a queue.
1074
1075       cmd:remote-completion (boolean)
1076              a boolean to control whether or not lftp uses remote completion.
1077              When true, Tab key guesses if the word being completed should be
1078              a  remote  file name. Meta-Tab does remote completion always. So
1079              you can force remote completion with Meta-Tab  when  cmd:remote-
1080              completion is false or when the guess is wrong.
1081
1082       cmd:save-cwd-history (boolean)
1083              when   true,   lftp   saves   last   CWD   of   each   site   to
1084              ~/.local/share/lftp/cwd_history or ~/.lftp/cwd_history, allowing
1085              to do ``cd -'' after lftp restart. Default is true.
1086
1087       cmd:save-rl-history (boolean)
1088              when     true,     lftp     saves     readline     history    to
1089              ~/.local/share/lftp/rl_history or  ~/.lftp/rl_history  on  exit.
1090              Default is true.
1091
1092       cmd:show-status (boolean)
1093              when  false, lftp does not show status line on terminal. Default
1094              is true.
1095
1096       cmd:set-term-status (boolean)
1097              when true, lftp  updates  terminal  status  if  supported  (e.g.
1098              xterm).  The  closure for this setting is the terminal type from
1099              TERM environment variable.
1100
1101       cmd:status-interval (timeinterval)
1102              the time interval between status updates.
1103
1104       cmd:stifle-rl-history (number)
1105              the number of lines to keep in readline history.
1106
1107       cmd:term-status (string)
1108              the format string to use to display terminal status. The closure
1109              for  this  setting  is  the  terminal type from TERM environment
1110              variable. Default uses ``tsl'' and ``fsl'' termcap values.
1111
1112              The following escapes are supported:
1113
1114              \a   bell
1115              \e   escape
1116              \n   new line
1117              \s   "lftp"
1118              \v   lftp version
1119              \T   the status string
1120
1121       cmd:time-style (string)
1122              This setting is the default value for cls --time-style option.
1123
1124       cmd:trace (boolean)
1125              when true, lftp prints the commands it executes (like sh -x).
1126
1127       cmd:verify-host (boolean)
1128              if true, lftp resolves host name immediately in `open'  command.
1129              It  is  also possible to skip the check for a single `open' com‐
1130              mand if `&' is given, or if ^Z is pressed during the check.
1131
1132       cmd:verify-path (boolean)
1133              if true, lftp checks the path given in `cd' command.  It is also
1134              possible  to  skip the check for a single `cd' command if `&' is
1135              given, or if ^Z is pressed during the check.  Examples:
1136              set cmd:verify-path/hftp://* false
1137              cd directory &
1138
1139       cmd:verify-path-cached (boolean)
1140              When false, `cd' to a directory known  from  cache  as  existent
1141              will  succeed  immediately.   Otherwise  the  verification  will
1142              depend on cmd:verify-path setting.
1143
1144       color:use-color (tri-boolean)
1145              when true, cls command and completion output colored file  list‐
1146              ings  according  to color:dir-colors setting.  When set to auto,
1147              colors are used when output is a terminal.
1148
1149       color:dir-colors (string)
1150              file listing color description. By default the value of  LS_COL‐
1151              ORS environment variable is used. See dircolors(1).
1152
1153       dns:SRV-query (boolean)
1154              query for SRV records and use them before gethostbyname. The SRV
1155              records are only used if port is not explicitly  specified.  See
1156              RFC2052 for details.
1157
1158       dns:cache-enable (boolean)
1159              enable  DNS  cache.  If  it is off, lftp resolves host name each
1160              time it reconnects.
1161
1162       dns:cache-expire (time interval)
1163              time to  live  for  DNS  cache  entries.  It  has  format  <num‐
1164              ber><unit>+,  e.g.   1d12h30m5s  or just 36h. To disable expira‐
1165              tion, set it to `inf' or `never'.
1166
1167       dns:cache-size (number)
1168              maximum number of DNS cache entries.
1169
1170       dns:fatal-timeout (time interval)
1171              limit the time for DNS queries. If DNS server is unavailable too
1172              long,  lftp  will  fail  to  resolve  a  given host name. Set to
1173              `never' to disable.
1174
1175       dns:order (list of protocol names)
1176              sets the order of DNS queries. Default is ``inet6  inet''  which
1177              means  first  look up address in inet6 family, then inet and use
1178              them in that order.  To disable inet6 (AAAA)  lookup,  set  this
1179              variable to ``inet''.
1180
1181       dns:use-fork (boolean)
1182              if  true,  lftp will fork before resolving host address. Default
1183              is true.
1184
1185       dns:max-retries (number)
1186              If zero, there is no limit on the number of times lftp will  try
1187              to lookup an address.  If > 0, lftp will try only this number of
1188              times to look up an address of each address family in dns:order.
1189
1190       dns:name (string)
1191              This setting can be used to substitute a host  name  alias  with
1192              another  name  or IP address. The host name alias is used as the
1193              setting closure, the substituted name or IP address  is  in  the
1194              value. Multiple names or IP addresses can be separated by comma.
1195
1196       file:charset (string)
1197              local character set. It is set from current locale initially.
1198
1199       file:use-lock (boolean)
1200              when  true, lftp uses advisory locking on local files when open‐
1201              ing them.
1202
1203       file:use-fallocate (boolean)
1204              when true, lftp uses fallocate(2) or posix_fallocate(3) to  pre-
1205              allocate storage space and reduce file fragmentation in pget and
1206              torrent commands.
1207
1208       fish:auto-confirm (boolean)
1209              when true, lftp answers ``yes'' to all ssh questions, in partic‐
1210              ular  to the question about a new host key. Otherwise it answers
1211              ``no''.
1212
1213       fish:charset (string)
1214              the character set used by fish server in requests,  replies  and
1215              file listings.  Default is empty which means the same as local.
1216
1217       fish:connect-program (string)
1218              the  program  to  use for connecting to remote server. It should
1219              support `-l' option for user name, `-p' for port number. Default
1220              is  `ssh  -a -x'. You can set it to `rsh', for example. For pri‐
1221              vate key authentication add `-i' option with the key file.
1222
1223       fish:shell (string)
1224              use specified shell on server side. Default is /bin/sh. On  some
1225              systems,  /bin/sh  exits  when doing cd to a non-existent direc‐
1226              tory. lftp can handle that but it has to reconnect.  Set  it  to
1227              /bin/bash for such systems if bash is installed.
1228
1229       ftp:acct (string)
1230              Send  this  string  in  ACCT  command after login. The result is
1231              ignored.  The closure for this setting has format user@host.
1232
1233       ftp:anon-pass (string)
1234              sets the password used for anonymous FTP access  authentication.
1235              Default is "lftp@".
1236
1237       ftp:anon-user (string)
1238              sets the user name used for anonymous FTP access authentication.
1239              Default is "anonymous".
1240
1241       ftp:auto-sync-mode (regex)
1242              if first server message matches this regex, turn  on  sync  mode
1243              for that host.
1244
1245       ftp:catch-size (boolean)
1246              when  there  is  no  support for SIZE command, try to catch file
1247              size from the "150 Opening data connection" reply.
1248
1249       ftp:charset (string)
1250              the character set used by FTP server in  requests,  replies  and
1251              file  listings.  Default is empty which means the same as local.
1252              This setting is only used when the server does not support UTF8.
1253
1254       ftp:client (string)
1255              the name of FTP client to send with CLNT command,  if  supported
1256              by server.  If it is empty, then no CLNT command will be sent.
1257
1258       ftp:compressed-re (regex)
1259              files with matching name will be considered compressed and "MODE
1260              Z" will not be used for them.
1261
1262       ftp:bind-data-socket (boolean)
1263              bind data socket to the interface of control connection (in pas‐
1264              sive  mode).   Default is true, exception is the loopback inter‐
1265              face.
1266
1267       ftp:fix-pasv-address (boolean)
1268              if true, lftp will try to correct address returned by server for
1269              PASV  command  in  case when server address is in public network
1270              and PASV returns an address from a private network. In this case
1271              lftp would substitute server address instead of the one returned
1272              by PASV command, port number would not be changed.   Default  is
1273              true.
1274
1275       ftp:fxp-passive-source (boolean)
1276              if  true,  lftp  will try to set up source FTP server in passive
1277              mode first, otherwise destination one. If first  attempt  fails,
1278              lftp  tries  to set them up the other way. If the other disposi‐
1279              tion fails too, lftp falls back to plain copy. See also ftp:use-
1280              fxp.
1281
1282       ftp:home (string)
1283              Initial directory. Default is empty string which means auto. Set
1284              this to `/' if you don't like the look of %2F in FTP  URLs.  The
1285              closure for this setting has format user@host.
1286
1287       ftp:ignore-pasv-address (boolean)
1288              If true, lftp uses control connection address instead of the one
1289              returned in PASV reply for data connection. This can  be  useful
1290              for broken NATs.  Default is false.
1291
1292       ftp:list-empty-ok (boolean)
1293              if  set  to false, empty lists from LIST command will be treated
1294              as incorrect, and another method (NLST) will be used.
1295
1296       ftp:list-options (string)
1297              sets options which are always appended to LIST command.  It  can
1298              be  useful to set this to `-a' if server does not show dot (hid‐
1299              den) files by default.  Default is empty.
1300
1301       ftp:mode-z-level (number)
1302              compression level (0-9) for uploading with MODE Z.
1303
1304       ftp:nop-interval (seconds)
1305              delay between NOOP commands when downloading  tail  of  a  file.
1306              This  is  useful  for FTP servers which send "Transfer complete"
1307              message before flushing data transfer. In such cases  NOOP  com‐
1308              mands can prevent connection timeout.
1309
1310       ftp:passive-mode (boolean)
1311              sets  passive  FTP  mode. This can be useful if you are behind a
1312              firewall or a dumb masquerading router.  In  passive  mode  lftp
1313              uses  PASV command, not the PORT command which is used in active
1314              mode. In passive mode lftp itself makes the data  connection  to
1315              the  server; in active mode the server connects to lftp for data
1316              transfer. Passive mode is the default.
1317
1318       ftp:port-ipv4 (ipv4 address)
1319              specifies an IPv4 address to send with PORT command. Default  is
1320              empty  which  means  to send the address of local end of control
1321              connection.
1322
1323       ftp:port-range (from-to)
1324              allowed port range for the local side of  the  data  connection.
1325              Format  is  min-max,  or  `full'  or `any' to indicate any port.
1326              Default is `full'.
1327
1328       ftp:prefer-epsv (boolean)
1329              use EPSV as preferred passive mode. Default is `false'.
1330
1331       ftp:proxy (URL)
1332              specifies FTP proxy to use.  To disable proxy set this to  empty
1333              string. Note that it is a FTP proxy which uses FTP protocol, not
1334              FTP over HTTP. Default value is taken from environment  variable
1335              ftp_proxy  if  it  starts  with  ``ftp://''.  If  your FTP proxy
1336              requires authentication, specify user name and password  in  the
1337              URL.   If  ftp:proxy starts with http:// then hftp protocol (FTP
1338              over HTTP proxy) is used instead of FTP automatically.
1339
1340       ftp:proxy-auth-type (string)
1341              When set to ``joined'', lftp  sends  ``user@proxy_user@ftp.exam‐
1342              ple.org'' as user name to proxy, and ``password@proxy_password''
1343              as password.
1344
1345              When set to ``joined-acct'', lftp  sends  ``user@ftp.example.org
1346              proxy_user''  (with space) as user name to proxy. The site pass‐
1347              word is sent as usual and the proxy password is expected in  the
1348              following ACCT command.
1349
1350              When  set  to  ``open'',  lftp  first sends proxy user and proxy
1351              password and then ``OPEN ftp.example.org''  followed  by  ``USER
1352              user''.  The site password is then sent as usual.
1353
1354              When  set to ``user'' (default), lftp first sends proxy user and
1355              proxy password and then ``user@ftp.example.org'' as  user  name.
1356              The site password is then sent as usual.
1357
1358              When   set  to  ``proxy-user@host'',  lftp  first  sends  ``USER
1359              proxy_user@ftp.example.org'', then proxy password. The site user
1360              and password are then sent as usual.
1361
1362       ftp:rest-list (boolean)
1363              allow  usage  of REST command before LIST command. This might be
1364              useful for large directories,  but  some  FTP  servers  silently
1365              ignore REST before LIST.
1366
1367       ftp:rest-stor (boolean)
1368              if false, lftp will not try to use REST before STOR. This can be
1369              useful for some buggy servers which corrupt  (fill  with  zeros)
1370              the file if REST followed by STOR is used.
1371
1372       ftp:retry-530 (regex)
1373              Retry  on server reply 530 for PASS command if text matches this
1374              regular expression.  This setting should be  useful  to  distin‐
1375              guish between overloaded server (temporary condition) and incor‐
1376              rect password (permanent condition).
1377
1378       ftp:retry-530-anonymous (regex)
1379              Additional  regular  expression  for   anonymous   login,   like
1380              ftp:retry-530.
1381
1382       ftp:site-group (string)
1383              Send  this  string in SITE GROUP command after login. The result
1384              is ignored.  The closure for this setting has format user@host.
1385
1386       ftp:skey-allow (boolean)
1387              allow sending skey/opie reply if server appears to  support  it.
1388              On by default.
1389
1390       ftp:skey-force (boolean)
1391              do  not send plain text password over the network, use skey/opie
1392              instead. If skey/opie is not available, assume failed login. Off
1393              by default.
1394
1395       ftp:ssl-allow (boolean)
1396              if  true,  try  to  negotiate SSL connection with FTP server for
1397              non-anonymous access. Default is true. This and other  SSL  set‐
1398              tings  are  only  available if lftp was compiled with an ssl/tls
1399              library.
1400
1401       ftp:ssl-auth (string)
1402              the argument for AUTH command, can be one of  SSL,  TLS,  TLS-P,
1403              TLS-C.  See RFC4217 for explanations. By default TLS or SSL will
1404              be used, depending on FEAT reply.
1405
1406       ftp:ssl-data-use-keys (boolean)
1407              if true, lftp loads ssl:key-file for protected  data  connection
1408              too.  When false, it does not, and the server can match data and
1409              control connections by session ID.  Default is true.
1410
1411       ftp:ssl-force (boolean)
1412              if true, refuse to send password in clear when server  does  not
1413              support SSL.  Default is false.
1414
1415       ftp:ssl-protect-data (boolean)
1416              if  true,  request  SSL connection for data transfers. This pro‐
1417              vides privacy and transmission error correction. Was  cpu-inten‐
1418              sive on old CPUs. Default is true.
1419
1420       ftp:ssl-protect-fxp (boolean)
1421              if  true,  request  SSL connection for data transfer between two
1422              FTP servers in FXP mode. CPSV or SSCN command will  be  used  in
1423              that  case.  If SSL connection fails for some reason, lftp would
1424              try unprotected FXP transfer unless ftp:ssl-force is set for any
1425              of the two servers. Default is true.
1426
1427       ftp:ssl-protect-list (boolean)
1428              if true, request SSL connection for file list transfers. Default
1429              is true.
1430
1431       ftp:ssl-use-ccc (boolean)
1432              if true, lftp would issue CCC command after logon, thus  disable
1433              ssl protection layer on control connection.
1434
1435       ftp:stat-interval (time interval)
1436              interval between STAT commands. Default is 1 second.
1437
1438       ftp:strict-multiline (boolean)
1439              when  true,  lftp  strictly  checks  for  multiline reply format
1440              (expects it to end with the same code as it started with).  When
1441              false, this check is relaxed.
1442
1443       ftp:sync-mode (boolean)
1444              if  true,  lftp  will  send  one  command at a time and wait for
1445              response. This might be useful if you  are  using  a  buggy  FTP
1446              server  or router. When it is off, lftp sends a pack of commands
1447              and waits for responses - it speeds up operation when round trip
1448              time  is  significant.   Unfortunately it does not work with all
1449              FTP servers and some routers have troubles with it, so it is  on
1450              by default.
1451
1452       ftp:timezone (string)
1453              Assume  this timezone for time in listings returned by LIST com‐
1454              mand.  This setting can be GMT offset [+|-]HH[:MM[:SS]]  or  any
1455              valid       TZ       value      (e.g.      Europe/Moscow      or
1456              MSK-3MSD,M3.5.0,M10.5.0/3). The default is GMT.  Set  it  to  an
1457              empty  value  to  assume local timezone specified by environment
1458              variable TZ.
1459
1460       ftp:too-many-re (regexp)
1461              Decrease the  dynamic  connection  limit  when  421  reply  line
1462              matches this regular expression.
1463
1464       ftp:trust-feat (string)
1465              When  true, assume that FEAT returned data are correct and don't
1466              use common protocol extensions like SIZE, MDTM, REST if they are
1467              not listed.  Default is false.
1468
1469       ftp:use-abor (boolean)
1470              if  false,  lftp does not send ABOR command but closes data con‐
1471              nection immediately.
1472
1473       ftp:use-allo (boolean)
1474              when true, lftp sends ALLO command before uploading a file.
1475
1476       ftp:use-feat (boolean)
1477              when  true  (default),  lftp  uses  FEAT  command  to  determine
1478              extended features of ftp server.
1479
1480       ftp:use-fxp (boolean)
1481              if  true,  lftp will try to set up direct connection between two
1482              ftp servers.
1483
1484       ftp:use-hftp (boolean)
1485              when ftp:proxy points to an http  proxy,  this  setting  selects
1486              hftp  method  (GET,  HEAD)  when  true,  and CONNECT method when
1487              false. Default is true.
1488
1489       ftp:use-ip-tos (boolean)
1490              when true, lftp uses IPTOS_LOWDELAY for control  connection  and
1491              IPTOS_THROUGHPUT for data connections.
1492
1493       ftp:lang (boolean)
1494              the  language  selected with LANG command, if supported as indi‐
1495              cated by FEAT response. Default  is  empty  which  means  server
1496              default.
1497
1498       ftp:use-mdtm (boolean)
1499              when  true  (default),  lftp uses MDTM command to determine file
1500              modification time.
1501
1502       ftp:use-mdtm-overloaded (boolean)
1503              when true, lftp uses two argument MDTM command to set file modi‐
1504              fication time on uploaded files. Default is false.
1505
1506       ftp:use-mlsd (boolean)
1507              when  true,  lftp will use MLSD command for directory listing if
1508              supported by the server.
1509
1510       ftp:use-mode-z (boolean)
1511              when true, lftp will use "MODE Z" if supported by the server  to
1512              perform compressed transfers.
1513
1514       ftp:use-site-idle (boolean)
1515              when  true,  lftp  sends `SITE IDLE' command with net:idle argu‐
1516              ment. Default is false.
1517
1518       ftp:use-site-utime (boolean)
1519              when true, lftp sends 5-argument `SITE  UTIME'  command  to  set
1520              file modification time on uploaded files. Default is true.
1521
1522       ftp:use-site-utime2 (boolean)
1523              when  true,  lftp  sends  2-argument `SITE UTIME' command to set
1524              file modification time on uploaded files. Default is  true.   If
1525              5-argument  `SITE  UTIME' is also enabled, 2-argument command is
1526              tried first.
1527
1528       ftp:use-size (boolean)
1529              when true (default), lftp uses SIZE command  to  determine  file
1530              size.
1531
1532       ftp:use-stat (boolean)
1533              if  true,  lftp  sends STAT command in FXP mode transfer to know
1534              how much data has been transferred. See also  ftp:stat-interval.
1535              Default is true.
1536
1537       ftp:use-stat-for-list (boolean)
1538              when  true,  lftp  uses STAT instead of LIST command. By default
1539              `.' is used as STAT argument. Using STAT, lftp  avoids  creating
1540              data connection for directory listing. Some servers require spe‐
1541              cial options for STAT,  use  ftp:list-options  to  specify  them
1542              (e.g. -la).
1543
1544       ftp:use-telnet-iac (boolean)
1545              when  true  (default),  lftp uses TELNET IAC command and follows
1546              TELNET protocol as specified in RFC959. When false, it does  not
1547              follow TELNET protocol and thus does not double 255 (0xFF, 0377)
1548              character and does not prefix ABOR and STAT commands with TELNET
1549              IP+SYNCH signal.
1550
1551       ftp:use-tvfs (tri-boolean)
1552              When  set  to auto, usage of TVFS feature depends on FEAT server
1553              reply. Otherwise this setting tells whether use it  or  not.  In
1554              short,  if a server supports TVFS feature then it uses unix-like
1555              paths.
1556
1557       ftp:use-utf8 (boolean)
1558              if true, lftp sends `OPTS UTF8 ON' to  the  server  to  activate
1559              UTF-8 encoding (if supported). Disable it if the file names have
1560              a different encoding and the server has a trouble with it.
1561
1562       ftp:use-quit (boolean)
1563              if true, lftp sends QUIT before disconnecting from  ftp  server.
1564              Default is true.
1565
1566       ftp:verify-address (boolean)
1567              verify  that  data  connection comes from the network address of
1568              control connection peer. This can possibly prevent data  connec‐
1569              tion  spoofing which can lead to data corruption. Unfortunately,
1570              this can fail for  certain  ftp  servers  with  several  network
1571              interfaces,  when  they  do  not  set  outgoing  address on data
1572              socket, so it is disabled by default.
1573
1574       ftp:verify-port (boolean)
1575              verify that data connection has port 20 (ftp-data) on its remote
1576              end.   This  can  possibly  prevent  data connection spoofing by
1577              users of remote host. Unfortunately, too many windows  and  even
1578              unix  ftp  servers forget to set proper port on data connection,
1579              thus this check is off by default.
1580
1581       ftp:web-mode (boolean)
1582              disconnect after closing data connection. This can be useful for
1583              totally broken ftp servers. Default is false.
1584
1585       ftps:initial-prot (string)
1586              specifies  initial  PROT setting for FTPS connections. Should be
1587              one of: C, S, E, P, or  empty.  Default  is  empty  which  means
1588              unknown,  so that lftp will use PROT command unconditionally. If
1589              PROT command turns out to be unsupported, then Clear mode  would
1590              be assumed.
1591
1592       hftp:cache (boolean)
1593              allow server/proxy side caching for ftp-over-http protocol.
1594
1595       hftp:cache-control (string)
1596              specify corresponding HTTP request header.
1597
1598       hftp:decode (boolean)
1599              when  true, lftp automatically decodes the entity in hftp proto‐
1600              col when Content-Encoding header value  matches  deflate,  gzip,
1601              compress, x-gzip or x-compress.
1602
1603       hftp:proxy (URL)
1604              specifies HTTP proxy for FTP-over-HTTP protocol (hftp). The pro‐
1605              tocol hftp cannot work without a HTTP proxy, obviously.  Default
1606              value  is taken from environment variable ftp_proxy if it starts
1607              with   ``http://'',   otherwise   from   environment    variable
1608              http_proxy.   If your FTP proxy requires authentication, specify
1609              user name and password in the URL.
1610
1611       hftp:use-allprop (boolean)
1612              if true, lftp will send `<allprop/>' request body in  `PROPFIND'
1613              requests, otherwise it will send an empty request body.
1614
1615       hftp:use-authorization (boolean)
1616              if  set  to  off,  lftp will send password as part of URL to the
1617              proxy. This may be required  for  some  proxies  (e.g.  M-soft).
1618              Default is on, and lftp will send password as part of Authoriza‐
1619              tion header.
1620
1621       hftp:use-head (boolean)
1622              if set to off, lftp will try to use `GET' instead of `HEAD'  for
1623              hftp  protocol.  While this is slower, it may allow lftp to work
1624              with some proxies which don't  understand  or  mishandle  ``HEAD
1625              ftp://'' requests.
1626
1627       hftp:use-mkcol (boolean)
1628              if  set to off, lftp will try to use `PUT' instead of `MKCOL' to
1629              create directories with hftp protocol. Default is off.
1630
1631       hftp:use-propfind (boolean)
1632              if set to off, lftp will not try to use `PROPFIND' to get direc‐
1633              tory  contents with hftp protocol and use `GET' instead. Default
1634              is off. When enabled, lftp will also use PROPPATCH to  set  file
1635              modification time after uploading.
1636
1637       hftp:use-range (boolean)
1638              when true, lftp will use Range header for transfer restart.
1639
1640       hftp:use-type (boolean)
1641              If  set to off, lftp won't try to append `;type=' to URLs passed
1642              to proxy.   Some  broken  proxies  don't  handle  it  correctly.
1643              Default is on.
1644
1645       http:accept,  http:accept-charset,  http:accept-encoding,  http:accept-
1646       language (string)
1647              specify corresponding HTTP request headers.
1648
1649       http:authorization (string)
1650              the authorization to use by default, when no user is  specified.
1651              The format is ``user:password''. Default is empty which means no
1652              authorization.
1653
1654       http:cache (boolean)
1655              allow server/proxy side caching.
1656
1657       http:cache-control (string)
1658              specify corresponding HTTP request header.
1659
1660       http:cookie (string)
1661              send this cookie to server. A closure is useful here:
1662                   set cookie/www.somehost.com "param=value"
1663
1664       http:decode (boolean)
1665              when true, lftp automatically decodes the entity  when  Content-
1666              Encoding header value matches deflate, gzip, compress, x-gzip or
1667              x-compress.
1668
1669       http:post-content-type (string)
1670              specifies value of Content-Type HTTP  request  header  for  POST
1671              method.  Default is ``application/x-www-form-urlencoded''.
1672
1673       http:proxy (URL)
1674              specifies  HTTP proxy. It is used when lftp works over HTTP pro‐
1675              tocol.   Default  value  is  taken  from  environment   variable
1676              http_proxy.  If your proxy requires authentication, specify user
1677              name and password in the URL.
1678
1679       http:put-method (PUT or POST)
1680              specifies which HTTP method to use on put.
1681
1682       http:put-content-type (string)
1683              specifies value of Content-Type  HTTP  request  header  for  PUT
1684              method.
1685
1686       http:referer (string)
1687              specifies  value for Referer HTTP request header. Single dot `.'
1688              expands to current directory URL. Default is `.'. Set  to  empty
1689              string to disable Referer header.
1690
1691       http:set-cookies (boolean)
1692              if  true,  lftp  modifies  http:cookie variables when Set-Cookie
1693              header is received.
1694
1695       http:use-allprop (boolean)
1696              if true, lftp will send `<allprop/>' request body in  `PROPFIND'
1697              requests, otherwise it will send an empty request body.
1698
1699       http:use-mkcol (boolean)
1700              if  set to off, lftp will try to use `PUT' instead of `MKCOL' to
1701              create directories with HTTP protocol. Default is on.
1702
1703       http:use-propfind (boolean)
1704              if set to off, lftp will not try to use `PROPFIND' to get direc‐
1705              tory  contents with HTTP protocol and use `GET' instead. Default
1706              is off. When enabled, lftp will also use PROPPATCH to set `Last-
1707              Modified' property after a file upload.
1708
1709       http:use-range (boolean)
1710              when true, lftp will use Range header for transfer restart.
1711
1712       http:user-agent (string)
1713              the string lftp sends in User-Agent header of HTTP request.
1714
1715       https:proxy (string)
1716              specifies  https  proxy. Default value is taken from environment
1717              variable https_proxy.
1718
1719       log:enabled (boolean)
1720              when true, the log messages are output. The closure for this and
1721              other  `log:'  variables is either `debug' for debug messages or
1722              `xfer' for transfer logging.
1723
1724       log:file (string)
1725              the target output file for logging. When empty, stderr is used.
1726
1727       log:level (number)
1728              the log verbosity level. Currently it's only defined for `debug'
1729              closure.
1730
1731       log:max-size (number)
1732              maximum size of the log file. When the size is reached, the file
1733              is renamed and started anew.
1734
1735       log:prefix-error (string)
1736
1737       log:prefix-note (string)
1738
1739       log:prefix-recv (string)
1740
1741       log:prefix-send (string)
1742              the prefixes for corresponding types of debug messages.
1743
1744       log:show-ctx (boolean)
1745
1746       log:show-pid (boolean)
1747
1748       log:show-time (boolean)
1749              select additional information in the log messages.
1750
1751       mirror:dereference (boolean)
1752              when true, mirror will dereference symbolic  links  by  default.
1753              You  can  override  it  by  --no-dereference  option. Default if
1754              false.
1755
1756       mirror:exclude-regex (regex)
1757              specifies default exclusion pattern.  You  can  override  it  by
1758              --include option.
1759
1760       mirror:include-regex (regex)
1761              specifies  default inclusion pattern. It is used just after mir‐
1762              ror:exclude-regex  is  applied.  It  is  never  used   if   mir‐
1763              ror:exclude-regex is empty.
1764
1765       mirror:no-empty-dirs (boolean)
1766              when   true,  mirror  doesn't  create  empty  directories  (like
1767              --no-empty-dirs option).
1768
1769       mirror:sort-by (string)
1770              specifies order of file transfers. Valid values are: name, name-
1771              desc,  size,  size-desc, date, date-desc. When the value is name
1772              or name-desc, then mirror:order setting also affects  the  order
1773              or transfers.
1774
1775       mirror:order (list of patterns)
1776              specifies  order  of  file  transfers when sorting by name. E.g.
1777              setting this to "*.sfv *.sum" makes  mirror  to  transfer  files
1778              matching  *.sfv  first,  then  ones  matching *.sum and then all
1779              other files. To process directories after other files, add  "*/"
1780              to the end of pattern list.
1781
1782       mirror:overwrite (boolean)
1783              when true, mirror will overwrite plain files instead of removing
1784              and re-creating them.
1785
1786       mirror:parallel-directories (boolean)
1787              if true, mirror will start processing of several directories  in
1788              parallel  when it is in parallel mode. Otherwise, it will trans‐
1789              fer files from a single directory before moving to other  direc‐
1790              tories.
1791
1792       mirror:parallel-transfer-count (number)
1793              specifies  number  of  parallel  transfers  mirror is allowed to
1794              start.  You can override it with --parallel option.   A  closure
1795              can  be matched against source or target host names, the minimum
1796              number greater than 0 is used.
1797
1798       mirror:require-source (boolean)
1799              When true, mirror requires a source directory  to  be  specified
1800              explicitly,  otherwise  it  is supposed to be the current direc‐
1801              tory.
1802
1803       mirror:set-permissions (boolean)
1804              When set to off, mirror won't try to  copy  file  and  directory
1805              permissions.   You can override it by --perms option. Default is
1806              on.
1807
1808       mirror:skip-noaccess (boolean)
1809              when true, mirror does not try to download files which are obvi‐
1810              ously inaccessible by the permission mask. Default is false.
1811
1812       mirror:use-pget-n (number)
1813              specifies -n option for pget command used to transfer every sin‐
1814              gle file under mirror.  A closure can be matched against  source
1815              or target host names, the minimum number greater than 0 is used.
1816              When the value is less than 2, pget is not used.
1817
1818       module:path (string)
1819              colon separated list of directories to look for modules. Can  be
1820              initialized by environment variable LFTP_MODULE_PATH. Default is
1821              `PKGLIBDIR/VERSION:PKGLIBDIR'.
1822
1823       net:connection-limit (number)
1824              maximum number of concurrent connections to  the  same  site.  0
1825              means unlimited.
1826
1827       net:connection-limit-timer (time interval)
1828              increase the dynamic connection limit after this time interval.
1829
1830       net:connection-takeover (boolean)
1831              if  true,  foreground  connections have priority over background
1832              ones and can interrupt background transfers to complete a  fore‐
1833              ground operation.
1834
1835       net:idle (time interval)
1836              disconnect  from  server after this idle time. Default is 3 min‐
1837              utes.
1838
1839       net:limit-rate (bytes per second)
1840              limit transfer rate on data connection. 0 means  unlimited.  You
1841              can specify two numbers separated by colon to limit download and
1842              upload rate separately.  Suffixes are supported, e.g. 100K means
1843              102400.
1844
1845       net:limit-max (bytes)
1846              limit accumulating of unused limit-rate. 0 means twice of limit-
1847              rate.
1848
1849       net:limit-total-rate (bytes per second)
1850              limit transfer rate of all connections in sum.  0  means  unlim‐
1851              ited.  You  can  specify two numbers separated by colon to limit
1852              download and upload rate separately.   Note  that  sockets  have
1853              receive  buffers  on  them,  this  can lead to network link load
1854              higher than this rate limit just after transfer  beginning.  You
1855              can  try  to  set net:socket-buffer to relatively small value to
1856              avoid this.
1857
1858       If you specify a closure, then rate limitation will be applied  to  sum
1859       of connections to a single matching host.
1860
1861       net:limit-total-max (bytes)
1862              limit  accumulating of unused limit-total-rate. 0 means twice of
1863              limit-total-rate.
1864
1865       net:max-retries (number)
1866              the maximum number of sequential tries of an  operation  without
1867              success.  0 means unlimited. 1 means no retries.
1868
1869       net:no-proxy (string)
1870              contains  comma separated list of domains for which proxy should
1871              not  be  used.   Default  is  taken  from  environment  variable
1872              no_proxy.
1873
1874       net:persist-retries (number)
1875              ignore  this number of hard errors. Useful to login to buggy FTP
1876              servers which reply 5xx when there is too many users.
1877
1878       net:reconnect-interval-base (seconds)
1879              sets the base minimal time between reconnects.  Actual  interval
1880              depends   on  net:reconnect-interval-multiplier  and  number  of
1881              attempts to perform an operation.
1882
1883       net:reconnect-interval-max (seconds)
1884              sets maximum reconnect interval.  When  current  interval  after
1885              multiplication by net:reconnect-interval-multiplier reaches this
1886              value (or exceeds it), it is reset back to  net:reconnect-inter‐
1887              val-base.
1888
1889       net:reconnect-interval-multiplier (real number)
1890              sets  multiplier  by which base interval is multiplied each time
1891              new attempt to perform an operation  fails.  When  the  interval
1892              reaches  maximum,  it is reset to base value. See net:reconnect-
1893              interval-base and net:reconnect-interval-max.
1894
1895       net:socket-bind-ipv4 (ipv4 address)
1896              bind all IPv4 sockets to specified address. This can  be  useful
1897              to  select a specific network interface to use. Default is empty
1898              which means not to bind  IPv4  sockets,  operating  system  will
1899              choose an address automatically using routing table.
1900
1901       net:socket-bind-ipv6 (ipv6 address)
1902              the same for IPv6 sockets.
1903
1904       net:socket-buffer (bytes)
1905              use  given  size  for  SO_SNDBUF and SO_RCVBUF socket options. 0
1906              means system default.
1907
1908       net:socket-maxseg (bytes)
1909              use given size for TCP_MAXSEG socket option. Not  all  operating
1910              systems support this option, but Linux does.
1911
1912       net:timeout (time interval)
1913              sets the network protocol timeout.
1914
1915       pget:default-n (number)
1916              default number of chunks to split the file to in pget.
1917
1918       pget:min-chunk-size (number)
1919              minimal chunk size to split the file to.
1920
1921       pget:save-status (time interval)
1922              save  pget transfer status this often. Set to `never' to disable
1923              saving of the status file.  The status is saved to a  file  with
1924              suffix .lftp-pget-status.
1925
1926       sftp:auto-confirm (boolean)
1927              when true, lftp answers ``yes'' to all ssh questions, in partic‐
1928              ular to the question about a new host key. Otherwise it  answers
1929              ``no''.
1930
1931       sftp:charset (string)
1932              the  character  set  used  by SFTP server in file names and file
1933              listings.  Default is empty which means the same as local.  This
1934              setting  is only used for SFTP protocol version prior to 4. Ver‐
1935              sion 4 and later always use UTF-8.
1936
1937       sftp:connect-program (string)
1938              the program to use for connecting to remote  server.  It  should
1939              support `-l' option for user name, `-p' for port number. Default
1940              is `ssh -a -x'.  For private key authentication add `-i'  option
1941              with the key file.
1942
1943       sftp:max-packets-in-flight (number)
1944              The maximum number of unreplied packets in flight. If round trip
1945              time  is  significant,  you  should  increase  this  and   size-
1946              read/size-write. Default is 16.
1947
1948       sftp:protocol-version (number)
1949              The  protocol number to negotiate. Default is 6. The actual pro‐
1950              tocol version used depends on the server.
1951
1952       sftp:server-program (string)
1953              The server program implementing SFTP protocol. If  it  does  not
1954              contain  a  slash  `/', it is considered a ssh2 subsystem and -s
1955              option  is  used  when  starting  connect-program.   Default  is
1956              `sftp'. You can use rsh as transport level protocol like this:
1957              set sftp:connect-program rsh
1958              set sftp:server-program /usr/libexec/openssh/sftp-server
1959       Similarly you can run SFTP over SSH1.
1960
1961       sftp:size-read (number)
1962              Block size for reading. Default is 0x8000.
1963
1964       sftp:size-write (number)
1965              Block size for writing. Default is 0x8000.
1966
1967       ssl:ca-file (path to file)
1968              use specified file as Certificate Authority certificate.
1969
1970       ssl:ca-path (path to directory)
1971              use  specified  directory  as  Certificate Authority certificate
1972              repository (OpenSSL only).
1973
1974       ssl:check-hostname (boolean)
1975              when true, lftp checks if the host name used to connect  to  the
1976              server corresponds to the host name in its certificate.
1977
1978       ssl:crl-file (path to file)
1979              use specified file as Certificate Revocation List certificate.
1980
1981       ssl:crl-path (path to directory)
1982              use  specified directory as Certificate Revocation List certifi‐
1983              cate repository (OpenSSL only).
1984
1985       ssl:key-file (path to file)
1986              use specified file as your private key.  This  setting  is  only
1987              used  for  ftps and https protocols. For sftp and fish protocols
1988              use sftp:connect-program and  fish:connect-program  respectively
1989              (add `-i' option to ssh).
1990
1991       ssl:cert-file (path to file)
1992              use specified file as your certificate.
1993
1994       ssl:use-sni (boolean)
1995              when true, use Server Name Indication (SNI) TLS extension.
1996
1997       ssl:verify-certificate (boolean)
1998              if  set to yes, then verify server's certificate to be signed by
1999              a known Certificate Authority and not be on Certificate  Revoca‐
2000              tion  List. You can specify either host name or certificate fin‐
2001              gerprint in the closure.
2002
2003       ssl:priority (string)
2004              free form priority string for GnuTLS. If built with OpenSSL  the
2005              understood  values are + or - followed by SSL3.0, TLS1.0, TLS1.1
2006              or TLS1.2, separated by :. Example:
2007              set ssl:priority "NORMAL:-SSL3.0:-TLS1.0:-TLS1.1:+TLS1.2"
2008
2009       torrent:ip (ipv4 address)
2010              IP address to send to the tracker. Specify it if you  are  using
2011              an HTTP proxy.
2012
2013       torrent:ipv6 (ipv6 address)
2014              IPv6  address  to  send  to the tracker. By default, first found
2015              global unicast address is used.
2016
2017       torrent:max-peers (number)
2018              maximum number of peers for a  torrent.  Least  used  peers  are
2019              removed to maintain this limit.
2020
2021       torrent:port-range (from-to)
2022              port  range  to accept connections on. A single port is selected
2023              when a torrent starts.
2024
2025       torrent:retracker (URL)
2026              explicit retracker URL, e.g. `http://retracker.local/announce'.
2027
2028       torrent:save-metadata (boolean)
2029              when true, lftp saves metadata of each torrent it works with  to
2030              ~/.local/share/lftp/torrent/md  or  ~/.lftp/torrent/md directory
2031              and loads it from there if necessary.
2032
2033       torrent:seed-max-time (time interval)
2034              maximum seed time. After this period of time a complete  torrent
2035              shuts  down independently of ratio. It can be set to infinity if
2036              needed.
2037
2038       torrent:seed-min-peers (number)
2039              minimum number of peers when the torrent is complete.  If  there
2040              are less, new peers are actively searched for.
2041
2042       torrent:stop-min-ppr (real number)
2043              minimum per-piece-ratio to stop seeding. Use it to avoid a situ‐
2044              ation when a popular piece  causes  quick  raise  of  the  total
2045              ratio.
2046
2047       torrent:stop-on-ratio (real number)
2048              torrent stops when it's complete and ratio reached this number.
2049
2050       torrent:timeout (time interval)
2051              maximum  time  without any progress. When it's reached, the tor‐
2052              rent shuts down.
2053
2054       torrent:use-dht (boolean)
2055              when true, DHT is used.
2056
2057       xfer:auto-rename(boolean)
2058              suggested filenames provided by the  server  are  used  if  user
2059              explicitly  sets  this option to `on'. As this could be security
2060              risk, default is off.
2061
2062       xfer:backup-suffix (string)
2063              a time format string (see strftime(3)) for backup file name when
2064              replacing an existing file.
2065
2066       xfer:clobber (boolean)
2067              if this setting is off, get commands will not overwrite existing
2068              files and generate an error instead.
2069
2070       xfer:destination-directory (path or URL to directory)
2071              This setting is used as default -O option for get and mget  com‐
2072              mands.   Default  is empty, which means current directory (no -O
2073              option).
2074
2075       xfer:disk-full-fatal (boolean)
2076              when true, lftp aborts a transfer if it cannot write target file
2077              because  of  full disk or quota; when false, lftp waits for disk
2078              space to be freed.
2079
2080       xfer:eta-period (seconds)
2081              the period over which weighted average  rate  is  calculated  to
2082              produce ETA.
2083
2084       xfer:eta-terse (boolean)
2085              show terse ETA (only high order parts). Default is true.
2086
2087       xfer:keep-backup (boolean)
2088              when  true, the backup file created before replacing an existing
2089              file is not removed after successful transfer.
2090
2091       xfer:make-backup (boolean)
2092              when true, lftp renames pre-existing  file  adding  xfer:backup-
2093              suffix instead of overwriting it.
2094
2095       xfer:max-redirections (number)
2096              maximum number of redirections. This can be useful for download‐
2097              ing over HTTP.  0 prohibits redirections.
2098
2099       xfer:parallel (number)
2100              the  default  number  of  parallel   transfers   in   a   single
2101              get/put/mget/mput command.
2102
2103       xfer:rate-period (seconds)
2104              the  period over which weighted average rate is calculated to be
2105              shown.
2106
2107       xfer:temp-file-name (string)
2108              temporary file name pattern, first asterisk is replaced  by  the
2109              original file name.
2110
2111       xfer:timeout (time interval)
2112              maximum  time  without  any transfer progress. It can be used to
2113              limit maximum time to retry a transfer from a  server  not  sup‐
2114              porting transfer restart.
2115
2116       xfer:use-temp-file (boolean)
2117              when true, a file will be transferred to a temporary file in the
2118              same directory and then renamed.
2119
2120       xfer:verify (boolean)
2121              when true, verify-command is launched after successful  transfer
2122              to  validate  file  integrity.  Zero  exit  code of that command
2123              should indicate correctness of the file.
2124
2125       xfer:verify-command (string)
2126              the command to validate file integrity. The only argument is the
2127              path to the file.
2128
2129
2130       The  name of a variable can be abbreviated unless it becomes ambiguous.
2131       The prefix before `:' can be omitted too. You can set one variable sev‐
2132       eral  times  for  different closures, and thus you can get a particular
2133       settings for particular state. The closure is  to  be  specified  after
2134       variable name separated with slash `/'.
2135
2136       The  closure  for `dns:', `net:', `ftp:', `http:', `hftp:' domain vari‐
2137       ables is currently just the host name as you specify it in  the  `open'
2138       command  (with  some  exceptions  where  closure  is  meaningless, e.g.
2139       dns:cache-size).  For some `cmd:' domain variables the closure is  cur‐
2140       rent  URL  without  path.   For  `log:' domain variables the closure is
2141       either `debug' or `xfer'.  For other  variables  it  is  not  currently
2142       used. See examples in the sample lftp.conf.
2143
2144       Certain  commands  and  settings take a time interval parameter. It has
2145       the format Nx[Nx...], where N is time amount (floating point) and x  is
2146       time  unit: d - days, h - hours, m - minutes, s - seconds. Default unit
2147       is second. E.g. 5h30m or 5.5h.  Also the interval  can  be  `infinity',
2148       `inf',  `never',  `forever'  -  it means infinite interval. E.g. `sleep
2149       forever' or `set dns:cache-expire never'.
2150
2151       Boolean settings can be one of (true, on, yes, 1, +) for a  True  value
2152       or one of (false, off, no, 0, -) for a False value.
2153
2154       Tri-boolean settings have either a boolean value or `auto'.
2155
2156       Integer  settings can have a suffix: k - kibi, m - mebi, g - gigi, etc.
2157       They can also have a prefix: 0 - octal, 0x - hexadecimal.
2158
2159
2160   FTP asynchronous mode (pipelining)
2161       Lftp can speed up FTP operations by sending several  commands  at  once
2162       and  then checking all the responses. See ftp:sync-mode variable. Some‐
2163       times this does not work, thus synchronous mode is the default. You can
2164       try  to  turn  synchronous  mode off and see if it works for you. It is
2165       known that some network software dealing with address translation works
2166       incorrectly in the case of several FTP commands in one network packet.
2167
2168       RFC959 says: ``The user-process sending another command before the com‐
2169       pletion reply would be in violation of protocol;  but  server-FTP  pro‐
2170       cesses  should queue any commands that arrive while a preceding command
2171       is in progress''. Also, RFC1123 says: ``Implementors  MUST  NOT  assume
2172       any  correspondence  between  READ boundaries on the control connection
2173       and the Telnet EOL sequences (CR LF).'' and ``a single  READ  from  the
2174       control connection may include more than one FTP command''.
2175
2176       So  it  must  be safe to send several commands at once, which speeds up
2177       operation a lot and seems to work with  all  Unix  and  VMS  based  ftp
2178       servers.  Unfortunately, windows based servers often cannot handle sev‐
2179       eral commands in one packet, and so cannot some broken routers.
2180
2181

OPTIONS

2183       -d     Switch on debugging mode.
2184
2185       -e commands
2186              Execute given commands and don't exit.
2187
2188       -p port
2189              Use the given port to connect.
2190
2191       -u user[,pass]
2192              Use the given username and  password  to  connect.  Remember  to
2193              quote  the  password properly in the shell. Also note that it is
2194              not secure to specify the password on command line, use ~/.netrc
2195              file   or   LFTP_PASSWORD  environment  variable  together  with
2196              --env-password option. Alternatively you can use ssh-based  pro‐
2197              tocols  with authorized keys, so you don't have to enter a pass‐
2198              word.
2199
2200       --norc Don't execute rc files from the home directory.
2201
2202       --rcfile file
2203              Execute commands from the file. May be specified multiple times.
2204
2205       -f script_file
2206              Execute commands in the file and exit.  This option must be used
2207              alone without other arguments (except --norc).
2208
2209       -c commands
2210              Execute  the  given commands and exit. Commands can be separated
2211              with a semicolon, `&&' or `||'. Remember to quote  the  commands
2212              argument  properly in the shell.  This option must be used alone
2213              without other arguments (except --norc).
2214
2215       Other open options may also be given on the lftp command line.
2216
2217

ENVIRONMENT VARIABLES

2219       The following environment variables are processed by lftp:
2220
2221       EDITOR Used as local editor for the edit command.
2222
2223       HOME   Used for (local) tilde (`~') expansion.
2224
2225       SHELL  Used by the ! command to determine the shell to run.
2226
2227       PAGER  This should be the name of the pager to use.  It's used  by  the
2228              more and zmore commands.
2229
2230       http_proxy, https_proxy
2231              Used to set initial http:proxy, hftp:proxy and https:proxy vari‐
2232              ables.
2233
2234       ftp_proxy
2235              Used to set initial ftp:proxy or hftp:proxy variables, depending
2236              on URL protocol used in this environment variable.
2237
2238       no_proxy
2239              Used to set initial net:no-proxy variable.
2240
2241       LFTP_MODULE_PATH
2242              Used to set initial module:path variable.
2243
2244       LFTP_HOME
2245              Used  to locate the directory that stores user-specific configu‐
2246              ration files. If unset, ~/.lftp will be used. Please  note  that
2247              if  this  directory does not exist, then XDG directories will be
2248              used.
2249
2250       LFTP_PASSWORD
2251              Used for --env-password open option.
2252
2253       LS_COLORS
2254              used to set initial color:dir-colors variable.
2255
2256       XDG_CONFIG_HOME, XDG_DATA_HOME, XDG_CACHE_HOME
2257              Used to locate the  directories  for  user-specific  files  when
2258              ~/.lftp  (or  $LFTP_HOME directory) does not exist. Defaults are
2259              ~/.config, ~/.local/share and ~/.cache respectively. The  suffix
2260              /lftp is appended to make the full path to the directories.
2261
2262

FILES

2264       /etc/lftp.conf
2265              system-wide   startup   file.   Actual   location   depends   on
2266              --sysconfdir configure option. It is /etc when prefix  is  /usr,
2267              /usr/local/etc by default.
2268
2269
2270       ~/.config/lftp/rc or ~/.lftp/rc, ~/.lftprc
2271              These files are executed on lftp startup after /etc/lftp.conf.
2272
2273       ~/.local/share/lftp/log or ~/.lftp/log
2274              The  file  things  are  logged to when lftp moves into the back‐
2275              ground in nohup mode.
2276
2277       ~/.local/share/lftp/transfer_log or ~/.lftp/transfer_log
2278              The file transfers are logged to when  log:enabled/xfer  setting
2279              is  set  to `yes'.  The location can be changed by log:file/xfer
2280              setting.
2281
2282       ~/.local/share/lftp/bookmarks or ~/.lftp/bookmarks
2283              The file is used to store lftp's bookmarks.   See  the  bookmark
2284              command.
2285
2286       ~/.local/share/lftp/cwd_history or ~/.lftp/cwd_history
2287              The file is used to store last working directories for each site
2288              visited.
2289
2290       ~/.local/share/lftp/bg/ or ~/.lftp/bg/
2291              The directory is used to store named  sockets  for  backgrounded
2292              lftp processes.
2293
2294       ~/.cache/lftp/DHT/ or ~/.lftp/DHT/"
2295              The  directory  is used to store DHT id and nodes cache for IPv4
2296              and IPv6.  File name suffix is the host name.
2297
2298       ~/.cache/lftp/edit/ or ~/.lftp/edit/"
2299              The directory is used to store temporary files for edit command.
2300
2301       ~/.local/share/lftp/torrent/md/ or ~/.lftp/torrent/md/"
2302              The directory is used to store torrent  metadata.  It  is  espe‐
2303              cially  useful  for  magnet links, cached metadata can be loaded
2304              from the directory.  It can also serve as torrent history,  file
2305              names are the info_hash of torrents.
2306
2307       ~/.netrc
2308              The  file  is  consulted  to get default login and password to a
2309              server when it is specified without a  protocol  to  the  `open'
2310              command.   Passwords  are also searched here if an URL with user
2311              name but with no password is used.
2312
2313

SEE ALSO

2315       ftpd(8), ftp(1)
2316       RFC854 (telnet), RFC959 (ftp),  RFC1123,  RFC1945  (http/1.0),  RFC2052
2317       (SRV  RR),  RFC2228  (ftp  security  extensions),  RFC2389  (ftp FEAT),
2318       RFC2428  (ftp/ipv6),  RFC2518  (WebDAV),  RFC2616  (http/1.1),  RFC2617
2319       (http/1.1  authentication),  RFC2640  (ftp  i18n),  RFC3659 (ftp exten‐
2320       sions), RFC4217 (ftp over ssl), BEP0003 (BitTorrent Protocol),  BEP0005
2321       (DHT  Protocol), BEP0006 (Fast Extension), BEP0007 (IPv6 Tracker Exten‐
2322       sion), BEP0009 (Extension for Peers to Send  Metadata  Files),  BEP0010
2323       (Extension   Protocol),   BEP0012  (Multitracker  Metadata  Extension),
2324       BEP0023 (Tracker Returns Compact Peer Lists), BEP0032  (DHT  Extensions
2325       for IPv6).
2326       https://tools.ietf.org/html/draft-preston-ftpext-deflate-04 (ftp
2327       deflate transmission mode),
2328       https://tools.ietf.org/html/draft-ietf-secsh-filexfer-13 (sftp).
2329       http://wiki.theory.org/BitTorrentSpecification
2330       http://www.bittornado.com/docs/multitracker-spec.txt
2331       http://www.rasterbar.com/products/libtorrent/dht_sec.html (DHT security
2332       extension)
2333       http://xbtt.sourceforge.net/udp_tracker_protocol.html (UDP tracker)
2334
2335

AUTHOR

2337       Alexander V. Lukyanov
2338       lav@yars.free.net
2339
2340

ACKNOWLEDGMENTS

2342       This  manual  page  was originally written by Christoph Lameter <clame‐
2343       ter@debian.org>, for the Debian GNU/Linux system. The page was improved
2344       and  updated  later by Nicolas Lichtmaier <nick@Feedback.com.ar>, James
2345       Troup   <J.J.Troup@comp.brad.ac.uk>   and   Alexander    V.    Lukyanov
2346       <lav@yars.free.net>.
2347
2348
2349
2350                                  10 Aug 2017                          lftp(1)
Impressum