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.0.9.
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 not fatal error is
41       ignored and the operation is repeated. So  if  downloading  breaks,  it
42       will be restarted from the point automatically. Even if ftp server does
43       not support REST command, lftp will try to retrieve the file  from  the
44       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 when some jobs are not finished yet, lftp will move
57       itself to nohup mode in background. The same happens when  you  have  a
58       real modem hangup or when you close an xterm.
59
60       lftp  has builtin 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. You can place aliases and `set' commands there. Some people
71       prefer to see full protocol debug, use `debug' to turn  the  debug  on.
72       Use `debug 3' to see only greeting messages and error messages.
73
74       lftp  has  a  number of settable variables. You can use `set -a' to see
75       all variables and their values or `set -d' to  see  list  of  defaults.
76       Variable  names can be abbreviated and prefix can be omitted unless the
77       rest becomes ambiguous.
78
79       If lftp was compiled with OpenSSL (configure --with-openssl),  then  it
80       includes  software  developed  by  the  OpenSSL  Project for use in the
81       OpenSSL Toolkit. (http://www.openssl.org/)
82
83
84   Commands
85       ! shell command
86
87       Launch shell or shell command.
88
89            !ls
90
91       To do a directory listing of the local host.
92
93       alias  [name [value]]
94
95       Define or undefine alias name. If value is omitted, the alias is  unde‐
96       fined,  else it takes the value value. If no argument is given the cur‐
97       rent aliases are listed.
98
99            alias dir ls -lF
100            alias less zmore
101
102       anon
103
104       Sets the user to anonymous.  This is the default.
105
106       at time [ -- command ]
107
108       Wait until the given time and execute  given  (optional)  command.  See
109       also at(1).
110
111       bookmark  [subcommand]
112
113       The bookmark command controls bookmarks.
114            add <name> [<loc>]  add current place or given location
115                           to bookmarks and bind to given name
116            del <name>          remove bookmark with name
117            edit           start editor on bookmarks file
118            import <type>       import foreign bookmarks
119            list           list bookmarks (default)
120
121       cache  [subcommand]
122
123       The  cache  command controls local memory cache.  The following subcom‐
124       mands are recognized:
125            stat           print cache status (default)
126            on|off              turn on/off caching
127            flush               flush cache
128            size lim            set memory limit, -1 means unlimited
129            expire Nx      set cache expiration time to N seconds (x=s)
130                           minutes (x=m) hours (x=h) or days (x=d)
131
132       cat files
133
134       cat outputs the remote file(s) to stdout.  (See  also  more,  zcat  and
135       zmore)
136
137       cd rdir
138
139       Change  current  remote  directory.   The  previous remote directory is
140       stored as `-'. You can do `cd -' to change  the  directory  back.   The
141       previous  directory for each site is also stored on disk, so you can do
142       `open site; cd -' even after lftp restart.
143
144       chmod mode files
145
146       Change permission mask on remote files. The mode must be an octal  num‐
147       ber.
148
149       close [-a]
150
151       Close  idle  connections.  By default only with the current server, use
152       -a to close all idle connections.
153
154       cls [OPTS] files...
155
156       `cls' tries to retrieve information about specified files  or  directo‐
157       ries  and outputs the information according to format options. The dif‐
158       ference between `ls' and `cls' is that `ls' requests the server to for‐
159       mat file listing, and `cls' formats it itself, after retrieving all the
160       needed information.  See `help cls' for options.
161
162       command cmd args...
163
164       execute given command ignoring aliases.
165
166       debug [-o file] level|off
167
168       Switch debugging to level or turn it off.  Use -o to redirect the debug
169       output to a file.
170
171       echo [-n] string
172
173       guess what it does.
174
175       eval [-f format ] args...
176
177       without  -f  it  just  executes  given arguments as a command. With -f,
178       arguments are transformed into a new command. The  format  can  contain
179       plain  text and placeholders $0...$9 and $@, corresponding to the argu‐
180       ments.
181
182       exit [bg] [top] [kill] [code]
183
184       exit will exit from lftp or move to  background  if  there  are  active
185       jobs. If no job is active, code is passed to operating system as lftp's
186       termination status. If code is omitted, the exit code of  last  command
187       is used.
188
189       `exit  bg'  forces  moving  to  background  when cmd:move-background is
190       false.  `exit top' makes  top  level  `shell'  (internal  lftp  command
191       executor)  terminate.  `exit kill' kills all numbered jobs before exit‐
192       ing. The options can be combined, e.g.  `at 08:00 -- exit top  kill  &'
193       kills all jobs and makes lftp exit at specified time.
194
195       fg
196
197       Alias for `wait'.
198
199       find  [directory]
200
201       List files in the directory (current directory by default) recursively.
202       This can help with servers lacking ls -R support. You can redirect out‐
203       put of this command.
204
205       ftpcopy
206
207       Obsolete. Use one of the following instead:
208            get ftp://... -o ftp://...
209            get -O ftp://... file1 file2...
210            put ftp://...
211            mput ftp://.../*
212            mget -O ftp://... ftp://.../*
213       or  other  combinations  to  get FXP transfer (directly between two ftp
214       servers).  lftp would fallback to plain copy (via client) if FXP trans‐
215       fer cannot be initiated or ftp:use-fxp is false.
216
217       get [-E] [-a] [-c] [-O base] rfile [-o lfile] ...
218
219       Retrieve  the  remote  file rfile and store it as the local file lfile.
220       If -o is omitted, the file is stored to local file named as  base  name
221       of  rfile.  You can get multiple files by specifying multiple instances
222       of rfile (and -o lfile). Does not expand wildcards, use mget for that.
223            -c        continue, reget
224            -E        delete source files after successful transfer
225            -a        use ascii mode (binary is the default)
226            -O <base> specifies base directory or URL where files should be placed
227
228       Examples:
229            get README
230            get README -o debian.README
231            get README README.mirrors
232            get README -o debian.README README.mirrors -o debian.mirrors
233            get README -o ftp://some.host.org/debian.README
234            get README -o ftp://some.host.org/debian-dir/ (end slash is important)
235
236       get1 [OPTS] rfile
237
238       Transfer a single file. Options:
239            -o <lfile>     destination file name (default - basename of rfile)
240            -c        continue, reget
241            -E        delete source files after successful transfer
242            -a        use ascii mode (binary is the default)
243            --source-region=<from-to>
244                      transfer specified region of source file
245            --target-position=<pos>
246                      position in target file to write data at
247
248       glob [-d] [-a] [-f] command patterns
249
250       Glob given patterns containing metacharacters and pass result to  given
251       command.  E.g. ``glob echo *''.
252            -f   plain files (default)
253            -d   directories
254            -a   all types
255
256       help [cmd]
257
258       Print help for cmd or if no cmd was specified print a list of available
259       commands.
260
261       jobs [-v]
262
263       List running jobs. -v means verbose, several -v can be specified.
264
265       kill all|job_no
266
267       Delete specified job with job_no or all jobs.  (For job_no see jobs)
268
269       lcd ldir
270
271       Change current local directory ldir. The previous  local  directory  is
272       stored as `-'. You can do `lcd -' to change the directory back.
273
274       lpwd
275
276       Print current working directory on local machine.
277
278       ls params
279
280       List  remote  files. You can redirect output of this command to file or
281       via pipe to external command.  By default, ls output is cached, to  see
282       new listing use rels or cache flush.
283
284       mget [-c] [-d] [-a] [-E] [-O base] files
285
286       Gets selected files with expanded wildcards.
287
288            -c        continue, reget.
289            -d        create directories the same as file names and get
290                      the files into them instead of current directory.
291            -E        delete source files after successful transfer
292            -a        use ascii mode (binary is the default)
293            -O <base> specifies base directory or URL where files should be placed
294
295       mirror [OPTS] [source [target]]
296
297       Mirror  specified source directory to local target directory. If target
298       directory ends with a slash, the source base name is appended to target
299       directory  name.  Source and/or target can be URLs pointing to directo‐
300       ries.
301
302            -c, --continue      continue a mirror job if possible
303            -e, --delete        delete files not present at remote site
304                --delete-first       delete old files before transferring new ones
305                --depth-first        descend into subdirectories before transferring files
306            -s, --allow-suid         set suid/sgid bits according to remote site
307                --allow-chown   try to set owner and group on files
308                --ascii         use ascii mode transfers (implies --ignore-size)
309                --ignore-time        ignore time when deciding whether to download
310                --ignore-size        ignore size when deciding whether to download
311                --only-missing  download only missing files
312                --only-existing download only files already existing at target
313            -n, --only-newer    download only newer files (-c won't work)
314                --no-empty-dirs don't create empty directories (implies --depth-first)
315            -r, --no-recursion  don't go to subdirectories
316                --no-symlinks   don't create symbolic links
317            -p, --no-perms      don't set file permissions
318                --no-umask      don't apply umask to file modes
319            -R, --reverse       reverse mirror (put files)
320            -L, --dereference   download symbolic links as files
321            -N, --newer-than=SPEC    download only files newer than specified time
322                --on-change=CMD      execute the command if anything has been changed
323                --older-than=SPEC    download only files older than specified time
324                --size-range=RANGE   download only files with size in specified range
325            -P, --parallel[=N]  download N files in parallel
326                --use-pget[-n=N]     use pget to transfer every single file
327                --loop          loop until no changes found
328            -i RX, --include RX include matching files
329            -x RX, --exclude RX exclude matching files
330            -I GP, --include-glob GP include matching files
331            -X GP, --exclude-glob GP exclude matching files
332            -v, --verbose[=level]    verbose operation
333                --log=FILE      write lftp commands being executed to FILE
334                --script=FILE        write lftp commands to FILE, but don't execute them
335                --just-print, --dry-run   same as --script=-
336                --use-cache          use cached directory listings
337            --Remove-source-files    remove files after transfer (use with caution)
338            -a             same as --allow-chown --allow-suid --no-umask
339
340       When using -R, the first directory is local and the second  is  remote.
341       If  the  second  directory  is omitted, base name of first directory is
342       used.  If both directories are omitted, current local and remote direc‐
343       tories  are  used.   If target directory ends with a slash (except root
344       directory) then base name of source directory is appended.
345
346       RX is an extended regular expression, just like in egrep(1).
347
348       GP is a glob pattern, e.g. `*.zip'.
349
350       Include and exclude options can be specified multiple times.  It  means
351       that a file or directory would be mirrored if it matches an include and
352       does not match to excludes after the include, or does  not  match  any‐
353       thing  and  the  first check is exclude. Directories are matched with a
354       slash appended.
355
356       Note that symbolic links are  not  created  when  uploading  to  remote
357       server,  because  ftp  protocol cannot do it. To upload files the links
358       refer to, use `mirror -RL' command (treat symbolic links as files).
359
360       For option --newer-than you can either specify a file or time  specifi‐
361       cation like that used by at(1) command, e.g. `now-7days' or `week ago'.
362       If you specify a file, then modification time  of  that  file  will  be
363       used.
364
365       Verbosity level can be selected using --verbose=level option or by sev‐
366       eral -v options, e.g. -vvv. Levels are:
367            0 - no output (default)
368            1 - print actions
369            2 - +print not deleted file names (when -e is not specified)
370            3 - +print directory names which are mirrored
371
372       --only-newer turns off file size comparison and uploads/downloads  only
373       newer  files  even  if  size  is  different. By default older files are
374       transferred and replace newer ones.
375
376       You can mirror between two servers  if  you  specify  URLs  instead  of
377       directories.   FXP  is  used  automatically  for  transfers between ftp
378       servers, if possible.
379
380       Some ftp servers hide dot-files by default (e.g. .htaccess),  and  show
381       them only when LIST command is used with -a option. In such case try to
382       use `set ftp:list-options -a'.
383
384       mkdir [-p] dir(s)
385
386       Make remote directories. If -p is used, make all components of paths.
387
388       module module [ args ]
389
390       Load given module using dlopen(3) function. If  module  name  does  not
391       contain a slash, it is searched in directories specified by module:path
392       variable.   Arguments  are  passed   to   module_init   function.   See
393       README.modules for technical details.
394
395       more files
396
397       Same  as  `cat  files  |  more'. if PAGER is set, it is used as filter.
398       (See also cat, zcat and zmore)
399
400       mput [-c] [-d] [-a] [-E] [-O base] files
401
402       Upload files with wildcard expansion. By default it uses the base  name
403       of local name as remote one. This can be changed by `-d' option.
404            -c        continue, reput
405            -d        create directories the same as in file names and put the
406                      files into them instead of current directory
407            -E        delete source files after successful transfer (dangerous)
408            -a        use ascii mode (binary is the default)
409            -O <base> specifies base directory or URL where files should be placed
410
411       mrm file(s)
412
413       Same as `glob rm'. Removes specified file(s) with wildcard expansion.
414
415       mv file1 file2
416
417       Rename file1 to file2.
418
419       nlist [args]
420
421       List remote file names
422
423       open [-e cmd] [-u user[,pass]] [-p port] host|url
424
425       Select an ftp server.
426
427       pget [OPTS] rfile [-o lfile]
428
429       Gets  the  specified  file using several connections. This can speed up
430       transfer, but loads the net and server heavily impacting  other  users.
431       Use only if you really have to transfer the file ASAP.  Options:
432            -c        continue transfer. Requires lfile.lftp-pget-status file.
433            -n maxconn     set maximum number of connections (default is taken from pget:default-n setting)
434
435       put [-E] [-a] [-c] [-O base] lfile [-o rfile]
436
437       Upload  lfile  with  remote name rfile. If -o omitted, the base name of
438       lfile is used as remote name. Does not expand wildcards, use  mput  for
439       that.
440            -o <rfile>     specifies remote file name (default - basename of lfile)
441            -c        continue, reput
442                      it requires permission to overwrite remote files
443            -E        delete source files after successful transfer (dangerous)
444            -a        use ascii mode (binary is the default)
445            -O <base> specifies base directory or URL where files should be placed
446
447       pwd [-p]
448
449       Print current remote URL. Use `-p' option to show password in the URL.
450
451       queue [-n num ] cmd
452
453       Add  the given command to queue for sequential execution. Each site has
454       its own queue. `-n' adds the command  before  the  given  item  in  the
455       queue.  Don't try to queue `cd' or `lcd' commands, it may confuse lftp.
456       Instead do the cd/lcd before `queue' command, and it will remember  the
457       place in which the command is to be done. It is possible to queue up an
458       already running job by `queue wait <jobno>', but the job will  continue
459       execution even if it is not the first in queue.
460
461       `queue stop' will stop the queue, it will not execute any new commands,
462       but already running jobs will continue to run. You can use `queue stop'
463       to  create an empty stopped queue. `queue start' will resume queue exe‐
464       cution.  When you exit lftp, it will start all stopped queues automati‐
465       cally.
466
467       `queue'  with  no arguments will either create a stopped queue or print
468       queue status.
469
470       queue --delete|-d [index or wildcard expression]
471
472       Delete one or more items from the queue. If no argument is  given,  the
473       last entry in the queue is deleted.
474
475       queue --move|-m <index or wildcard expression> [index]
476
477       Move  the given items before the given queue index, or to the end if no
478       destination is given.
479
480            -q   Be quiet.
481            -v   Be verbose.
482            -Q   Output in a format that can be used to re-queue.
483                 Useful with --delete.
484
485            > get file &
486            [1] get file
487            > queue wait 1
488            > queue get another_file
489            > cd a_directory
490            > queue get yet_another_file
491
492            queue -d 3          Delete the third item in the queue.
493            queue -m 6 4        Move the sixth item in the queue before the fourth.
494            queue -m "get*zip" 1     Move all commands matching "get*zip" to the beginning
495                           of the queue.  (The order of the items is preserved.)
496            queue -d "get*zip"  Delete all commands matching "get*zip".
497
498       quote cmd
499
500       For FTP - send the command uninterpreted. Use with  caution  -  it  can
501       lead  to unknown remote state and thus will cause reconnect. You cannot
502       be sure that any change of remote state because of  quoted  command  is
503       solid - it can be reset by reconnect at any time.
504
505       For   HTTP  -  specific  to  HTTP  action.  Syntax:  ``quote  <command>
506       [<args>]''.  Command may be ``set-cookie'' or ``post''.
507            open http://www.site.net
508            quote set-cookie "variable=value; othervar=othervalue"
509            set http:post-content-type application/x-www-form-urlencoded
510            quote post /cgi-bin/script.cgi "var=value&othervar=othervalue" > local_file
511
512       For FISH - send the command uninterpreted. This can be used to  execute
513       arbitrary  commands on server. The command must not take input or print
514       ### at new line beginning. If it does, the protocol will become out  of
515       sync.
516            open fish://server
517            quote find -name \*.zip
518
519       reget rfile [-o lfile]
520
521       Same as `get -c'.
522
523       rels [args]
524
525       Same as `ls', but ignores the cache.
526
527       renlist [args]
528
529       Same as `nlist', but ignores the cache.
530
531       repeat [OPTS] [[-d] delay] [command]
532
533       Repeat  specified  command  with  a  delay between iterations.  Default
534       delay is one second, default command is empty.
535
536            -c <count>     maximum number of iterations
537            -d <delay>     delay between iterations
538            --while-ok     stop when command exits with non-zero code
539            --until-ok     stop when command exits with zero code
540            --weak         stop when lftp moves to background.
541
542       Examples:
543            repeat at tomorrow -- mirror
544            repeat 1d mirror
545
546       reput lfile [-o rfile]
547
548       Same as `put -c'.
549
550       rm [-r] [-f] files
551
552       Remove remote files.  Does not expand wildcards, use mrm for  that.  -r
553       is  for recursive directory remove. Be careful, if something goes wrong
554       you can lose files. -f suppress error messages.
555
556       rmdir dir(s)
557
558       Remove remote directories.
559
560       scache [session]
561
562       List cached sessions or switch to specified session.
563
564       set [var [val]]
565
566       Set variable to given value. If the value is omitted, unset  the  vari‐
567       able.   Variable  name  has  format ``name/closure'', where closure can
568       specify exact application of the setting. See below  for  details.   If
569       set  is  called with no variable then only altered settings are listed.
570       It can be changed by options:
571
572            -a   list all settings, including default values
573            -d   list only default values, not necessary current ones
574
575       site site_cmd
576
577       Execute site command site_cmd and output the result.  You can  redirect
578       its output.
579
580       sleep interval
581
582       Sleep  given time interval and exit. Interval is in seconds by default,
583       but can be suffixed with 'm', 'h', 'd'  for  minutes,  hours  and  days
584       respectively.  See also at.
585
586       slot [name]
587
588       Select  specified slot or list all slots allocated. A slot is a connec‐
589       tion to a server, somewhat like a virtual console. You can create  mul‐
590       tiple slots connected to different servers and switch between them. You
591       can also use slot:name as a pseudo-URL evaluating to  that  slot  loca‐
592       tion.
593
594       Default readline binding allows quick switching between slots named 0-9
595       using Meta-0 - Meta-9 keys (often you can use Alt instead of Meta).
596
597       source file
598       source -e command
599
600       Execute commands recorded in file file or returned by specified  exter‐
601       nal command.
602            source ~/.lftp/rc
603            source -e echo help
604
605       suspend
606
607       Stop  lftp  process. Note that transfers will be also stopped until you
608       continue the process with shell's fg or bg commands.
609
610       torrent torrent-file [-O directory]
611
612       Start BitTorrent process for the given torrent-file,  which  can  be  a
613       local  file  or URL. Existing files are first validated. Missing pieces
614       are downloaded. Files are stored  in  specified  directory  or  current
615       working directory by default. Seeding continues until ratio reachs tor‐
616       rent:stop-on-ratio setting or time of torrent:seed-max-time outs.
617
618       user user [pass]
619       user URL [pass]
620
621       Use specified info for remote login. If you specify an  URL  with  user
622       name, the entered password will be cached so that future URL references
623       can use it.
624
625       version
626
627       Print lftp version.
628
629       wait [jobno]
630       wait all
631
632       Wait for specified job to terminate. If jobno is omitted, wait for last
633       backgrounded job.
634
635       `wait all' waits for all jobs termination.
636
637       zcat files
638
639       Same as cat, but filter each file through zcat. (See also cat, more and
640       zmore)
641
642       zmore files
643
644       Same as more, but filter each file through zcat. (See  also  cat,  zcat
645       and more)
646
647
648   Settings
649       On  startup,  lftp  executes  ~/.lftprc  and ~/.lftp/rc.  You can place
650       aliases and `set' commands there. Some people prefer to see full proto‐
651       col debug, use `debug' to turn the debug on.
652
653       There  is also a system-wide startup file in /etc/lftp.conf.  It can be
654       in different directory, see FILES section.
655
656       lftp has the following settable variables (you can also use `set -a' to
657       see all variables and their values):
658
659       bmk:save-passwords (boolean)
660              save plain text passwords in ~/.lftp/bookmarks on `bookmark add'
661              command.  Off by default.
662
663       cmd:at-exit (string)
664              the commands in string are executed before lftp exits.
665
666       cmd:csh-history (boolean)
667              enables csh-like history expansion.
668
669       cmd:default-protocol (string)
670              The value is used when `open' is used with just host name  with‐
671              out protocol. Default is `ftp'.
672
673       cmd:fail-exit (boolean)
674              if  true, exit when a command fails and the following command is
675              unconditional (i.e. does not begin with || or  &&).  lftp  exits
676              after the unconditional command is issued without executing it.
677
678       cmd:long-running (seconds)
679              time  of  command execution, which is considered as `long' and a
680              beep is done before next prompt. 0 means off.
681
682       cmd:ls-default (string)
683              default ls argument
684
685       cmd:move-background (boolean)
686              when false, lftp refuses to go to background  when  exiting.  To
687              force it, use `exit bg'.
688
689       cmd:move-background-detach (boolean)
690              when  true (default), lftp detaches itself from the control ter‐
691              minal when moving to background, it is not  possible  to  attach
692              back;  when  false,  lftp tricks the shell to move lftp to back‐
693              ground process group and continues to run, then fg shell command
694              brings  lftp  back to foreground unless it has done all jobs and
695              terminated.
696
697       cmd:prompt (string)
698              The prompt. lftp recognizes the following backslash-escaped spe‐
699              cial characters that are decoded as follows:
700
701              \@     insert @ if current user is not default
702              \a     an ASCII bell character (07)
703              \e     an ASCII escape character (033)
704              \h     the hostname you are connected to
705              \n     newline
706              \s     the name of the client (lftp)
707              \S     current slot name
708              \u     the username of the user you are logged in as
709              \U     the     URL     of     the     remote     site     (e.g.,
710                     ftp://g437.ub.gu.se/home/james/src/lftp)
711              \v     the version of lftp (e.g., 2.0.3)
712              \w     the current working directory at the remote site
713              \W     the base name of the current  working  directory  at  the
714                     remote site
715              \nnn   the character corresponding to the octal number nnn
716              \\     a backslash
717              \?     skips next character if previous substitution was empty.
718              \[     begin  a sequence of non-printing characters, which could
719                     be used to embed a terminal  control  sequence  into  the
720                     prompt
721              \]     end a sequence of non-printing characters
722
723
724       cmd:parallel (number)
725              Number  of  jobs  run  in  parallel in non-interactive mode. For
726              example, this may be useful for scripts with multiple `get' com‐
727              mands.  Note that setting this to a value greater than 1 changes
728              conditional execution behaviour, basically  makes  it  inconsis‐
729              tent.
730
731       cmd:queue-parallel (number)
732              Number of jobs run in parallel in a queue.
733
734       cmd:time-style (string)
735              This setting is the default value for cls --time-style option.
736
737       cmd:trace (boolean)
738              when true, lftp prints the commands it executes (like sh -x).
739
740       cache:cache-empty-listings (boolean)
741              When false, empty listings are not cached.
742
743       cache:enable (boolean)
744              When false, cache is disabled.
745
746       cache:expire (time interval)
747              Positive cache entries expire in this time interval.
748
749       cache:expire-negative (time interval)
750              Negative cache entries expire in this time interval.
751
752       cache:size (number)
753              Maximum  cache size. When exceeded, oldest cache entries will be
754              removed from cache.
755
756       cmd:remote-completion (boolean)
757              a boolean to control whether or not lftp uses remote completion.
758
759       cmd:verify-host (boolean)
760              if true, lftp resolves host name immediately in `open'  command.
761              It  is  also possible to skip the check for a single `open' com‐
762              mand if `&' is given, or if ^Z is pressed during the check.
763
764       cmd:verify-path (boolean)
765              if true, lftp checks the path given in `cd' command.  It is also
766              possible  to  skip the check for a single `cd' command if `&' is
767              given, or if ^Z is pressed during the check.  Examples:
768                   set cmd:verify-path/hftp://* false
769                   cd directory &
770
771       cmd:verify-path-cached (boolean)
772              When false, `cd' to a directory known  from  cache  as  existent
773              will  succeed  immediately.   Otherwise  the  verification  will
774              depend on cmd:verify-path setting.
775
776       color:use-color (boolean)
777              when true, cls command and completion output colored file  list‐
778              ings according to color:dir-colors setting.
779
780       color:dir-colors (string)
781              file  listing color description. By default the value of LS_COL‐
782              ORS environment variable is used. See dircolors(1).
783
784       dns:SRV-query (boolean)
785              query for SRV records and use them before gethostbyname. The SRV
786              records  are  only used if port is not explicitly specified. See
787              RFC2052 for details.
788
789       dns:cache-enable (boolean)
790              enable DNS cache. If it is off, lftp  resolves  host  name  each
791              time it reconnects.
792
793       dns:cache-expire (time interval)
794              time  to  live  for  DNS  cache  entries.  It  has  format <num‐
795              ber><unit>+, e.g.  1d12h30m5s or just 36h.  To  disable  expira‐
796              tion, set it to `inf' or `never'.
797
798       dns:cache-size (number)
799              maximum number of DNS cache entries.
800
801       dns:fatal-timeout (time interval)
802              limit the time for DNS queries. If DNS server is unavailable too
803              long, lftp will fail to  resolve  a  given  host  name.  Set  to
804              `never' to disable.
805
806       dns:order (list of protocol names)
807              sets  the  order of DNS queries. Default is ``inet6 inet'' which
808              means first look up address in inet6 family, then inet  and  use
809              them  in  that  order.  To disable inet6 (AAAA) lookup, set this
810              variable to ``inet''.
811
812       dns:use-fork (boolean)
813              if true, lftp will fork before resolving host  address.  Default
814              is true.
815
816       dns:max-retries (number)
817              If  zero, there is no limit on the number of times lftp will try
818              to lookup an address.  If > 0, lftp will try only this number of
819              times to look up an address of each address family in dns:order.
820
821       file:charset (string)
822              local character set. It is set from current locale initially.
823
824       fish:charset (string)
825              the  character  set used by fish server in requests, replies and
826              file listings.  Default is empty which means the same as local.
827
828       fish:connect-program (string)
829              the program to use for connecting to remote  server.  It  should
830              support `-l' option for user name, `-p' for port number. Default
831              is `ssh -a -x'. You can set it to `rsh', for example.
832
833       fish:shell (string)
834              use specified shell on server side. Default is /bin/sh. On  some
835              systems,  /bin/sh  exits  when doing cd to a non-existent direc‐
836              tory. lftp can handle that but it has to reconnect.  Set  it  to
837              /bin/bash for such systems if bash is installed.
838
839       ftp:acct (string)
840              Send  this  string  in  ACCT  command after login. The result is
841              ignored.  The closure for this setting has format user@host.
842
843       ftp:anon-pass (string)
844              sets the password used for anonymous ftp access  authentication.
845              Default is "-name@", where name is the username of the user run‐
846              ning the program.
847
848       ftp:anon-user (string)
849              sets the user name used for anonymous ftp access authentication.
850              Default is "anonymous".
851
852       ftp:auto-sync-mode (regex)
853              if  first  server  message matches this regex, turn on sync mode
854              for that host.
855
856       ftp:charset (string)
857              the character set used by ftp server in  requests,  replies  and
858              file  listings.  Default is empty which means the same as local.
859              This setting is only used when the server does not support UTF8.
860
861       ftp:client (string)
862              the name of ftp client to send with CLNT command,  if  supported
863              by server.  If it is empty, then no CLNT command will be sent.
864
865       ftp:bind-data-socket (boolean)
866              bind data socket to the interface of control connection (in pas‐
867              sive mode).  Default is true, exception is the  loopback  inter‐
868              face.
869
870       ftp:fix-pasv-address (boolean)
871              if true, lftp will try to correct address returned by server for
872              PASV command in case when server address is  in  public  network
873              and PASV returns an address from a private network. In this case
874              lftp would substitute server address instead of the one returned
875              by  PASV  command, port number would not be changed.  Default is
876              true.
877
878       ftp:fxp-passive-source (boolean)
879              if true, lftp will try to set up source ftp  server  in  passive
880              mode  first,  otherwise destination one. If first attempt fails,
881              lftp tries to set them up the other way. If the  other  disposi‐
882              tion fails too, lftp falls back to plain copy. See also ftp:use-
883              fxp.
884
885       ftp:home (string)
886              Initial directory. Default is empty string which means auto. Set
887              this  to  `/' if you don't like the look of %2F in ftp URLs. The
888              closure for this setting has format user@host.
889
890       ftp:ignore-pasv-address (boolean)
891              If true, lftp uses control connection address instead of the one
892              returned  in  PASV reply for data connection. This can be useful
893              for broken NATs.  Default is false.
894
895       ftp:list-empty-ok (boolean)
896              if set to false, empty lists from LIST command will  be  treated
897              as incorrect, and another method (NLST) will be used.
898
899       ftp:list-options (string)
900              sets  options  which are always appended to LIST command. It can
901              be useful to set this to `-a' if server does not show dot  (hid‐
902              den) files by default.  Default is empty.
903
904       ftp:nop-interval (seconds)
905              delay  between  NOOP  commands  when downloading tail of a file.
906              This is useful for ftp servers which  send  "Transfer  complete"
907              message  before  flushing data transfer. In such cases NOOP com‐
908              mands can prevent connection timeout.
909
910       ftp:passive-mode (boolean)
911              sets passive ftp mode. This can be useful if you  are  behind  a
912              firewall  or  a  dumb  masquerading router. In passive mode lftp
913              uses PASV command, not the PORT command which is used in  active
914              mode.  In  passive mode lftp itself makes the data connection to
915              the server; in active mode the server connects to lftp for  data
916              transfer. Passive mode is the default.
917
918       ftp:port-ipv4 (ipv4 address)
919              specifies  an IPv4 address to send with PORT command. Default is
920              empty which means to send the address of local  end  of  control
921              connection.
922
923       ftp:port-range (from-to)
924              allowed  port  range  for  active  mode.   Format is min-max, or
925              `full' or `any' to indicate any port. Default is `full'.
926
927       ftp:prefer-epsv (boolean)
928              use EPSV as preferred passive mode. Default is `false'.
929
930       ftp:proxy (URL)
931              specifies ftp proxy to use.  To disable proxy set this to  empty
932              string.  Note  that  it is an ftp proxy which uses ftp protocol,
933              not ftp over http. Default value is taken from environment vari‐
934              able  ftp_proxy  if it starts with ``ftp://''. If your ftp proxy
935              requires authentication, specify user name and password  in  the
936              URL.   If  ftp:proxy starts with http:// then hftp protocol (ftp
937              over http proxy) is used instead of ftp automatically.
938
939       ftp:proxy-auth-type (string)
940              When set to ``joined'', lftp  sends  ``user@proxy_user@ftp.exam‐
941              ple.org'' as user name to proxy, and ``password@proxy_password''
942              as password.
943
944              When set to ``joined-acct'', lftp  sends  ``user@ftp.example.org
945              proxy_user''  (with space) as user name to proxy. The site pass‐
946              word is sent as usual and the proxy password is expected in  the
947              following ACCT command.
948
949              When  set  to  ``open'',  lftp  first sends proxy user and proxy
950              password and then ``OPEN ftp.example.org''  followed  by  ``USER
951              user''.  The site password is then sent as usual.
952
953              When  set to ``user'' (default), lftp first sends proxy user and
954              proxy password and then ``user@ftp.example.org'' as  user  name.
955              The site password is then sent as usual.
956
957              When   set  to  ``proxy-user@host'',  lftp  first  sends  ``USER
958              proxy_user@ftp.example.org'', then proxy password. The site user
959              and password are then sent as usual.
960
961       ftp:rest-list (boolean)
962              allow  usage  of REST command before LIST command. This might be
963              useful for large directories,  but  some  ftp  servers  silently
964              ignore REST before LIST.
965
966       ftp:rest-stor (boolean)
967              if false, lftp will not try to use REST before STOR. This can be
968              useful for some buggy servers which corrupt  (fill  with  zeros)
969              the file if REST followed by STOR is used.
970
971       ftp:retry-530 (regex)
972              Retry  on server reply 530 for PASS command if text matches this
973              regular expression.  This setting should be  useful  to  distin‐
974              guish between overloaded server (temporary condition) and incor‐
975              rect password (permanent condition).
976
977       ftp:retry-530-anonymous (regex)
978              Additional  regular  expression  for   anonymous   login,   like
979              ftp:retry-530.
980
981       ftp:site-group (string)
982              Send  this  string in SITE GROUP command after login. The result
983              is ignored.  The closure for this setting has format user@host.
984
985       ftp:skey-allow (boolean)
986              allow sending skey/opie reply if server appears to  support  it.
987              On by default.
988
989       ftp:skey-force (boolean)
990              do  not send plain text password over the network, use skey/opie
991              instead. If skey/opie is not available, assume failed login. Off
992              by default.
993
994       ftp:ssl-allow (boolean)
995              if  true,  try  to  negotiate SSL connection with ftp server for
996              non-anonymous access. Default is true. This and other  ssl  set‐
997              tings  are  only  available if lftp was compiled with an ssl/tls
998              library.
999
1000       ftp:ssl-data-use-keys (boolean)
1001              if true, lftp loads ssl:key-file for protected  data  connection
1002              too.  When false, it does not, and the server can match data and
1003              control connections by session ID.  Default is true.
1004
1005       ftp:ssl-force (boolean)
1006              if true, refuse to send password in clear when server  does  not
1007              support SSL.  Default is false.
1008
1009       ftp:ssl-protect-data (boolean)
1010              if true, request ssl connection for data transfers. This is cpu-
1011              intensive but provides privacy. Default is false.
1012
1013       ftp:ssl-protect-fxp (boolean)
1014              if true, request ssl connection for data  transfer  between  two
1015              ftp  servers  in  FXP mode. CPSV or SSCN command will be used in
1016              that case. If ssl connection fails for some reason,  lftp  would
1017              try unprotected FXP transfer unless ftp:ssl-force is set for any
1018              of the two servers. Default is false.
1019
1020       ftp:ssl-protect-list (boolean)
1021              if true, request ssl connection for file list transfers. Default
1022              is true.
1023
1024       ftp:ssl-use-ccc (boolean)
1025              if  true, lftp would issue CCC command after logon, thus disable
1026              ssl protection layer on control connection.
1027
1028       ftp:stat-interval (time interval)
1029              interval between STAT commands. Default is 1 second.
1030
1031       ftp:sync-mode (boolean)
1032              if true, lftp will send one command  at  a  time  and  wait  for
1033              response.  This  might  be  useful  if you are using a buggy ftp
1034              server or router. When it is off, lftp sends a pack of  commands
1035              and waits for responses - it speeds up operation when round trip
1036              time is significant.  Unfortunately it does not  work  with  all
1037              ftp  servers and some routers have troubles with it, so it is on
1038              by default.
1039
1040       ftp:timezone (string)
1041              Assume this timezone for time in listings returned by LIST  com‐
1042              mand.   This  setting can be GMT offset [+|-]HH[:MM[:SS]] or any
1043              valid      TZ      value      (e.g.       Europe/Moscow       or
1044              MSK-3MSD,M3.5.0,M10.5.0/3).  The  default  is GMT.  Set it to an
1045              empty value to assume local timezone  specified  by  environment
1046              variable TZ.
1047
1048       ftp:trust-feat (string)
1049              When  true, assume that FEAT returned data are correct and don't
1050              use common protocol extensions like SIZE, MDTM, REST if they are
1051              not listed.  Default is false.
1052
1053       ftp:use-abor (boolean)
1054              if  false,  lftp does not send ABOR command but closes data con‐
1055              nection immediately.
1056
1057       ftp:use-allo (boolean)
1058              when true (default), lftp sends ALLO command before uploading  a
1059              file.
1060
1061       ftp:use-feat (boolean)
1062              when  true  (default),  lftp  uses  FEAT  command  to  determine
1063              extended features of ftp server.
1064
1065       ftp:use-fxp (boolean)
1066              if true, lftp will try to set up direct connection  between  two
1067              ftp servers.
1068
1069       ftp:use-hftp (boolean)
1070              when  ftp:proxy  points  to  an http proxy, this setting selects
1071              hftp method (GET, HEAD)  when  true,  and  CONNECT  method  when
1072              false. Default is true.
1073
1074       ftp:lang (boolean)
1075              the  language  selected with LANG command, if supported as indi‐
1076              cated by FEAT response. Default  is  empty  which  means  server
1077              default.
1078
1079       ftp:use-mdtm (boolean)
1080              when  true  (default),  lftp uses MDTM command to determine file
1081              modification time.
1082
1083       ftp:use-mdtm-overloaded (boolean)
1084              when true, lftp uses two argument MDTM command to set file modi‐
1085              fication time on uploaded files. Default is false.
1086
1087       ftp:use-site-idle (boolean)
1088              when  true,  lftp  sends `SITE IDLE' command with net:idle argu‐
1089              ment. Default is false.
1090
1091       ftp:use-site-utime (boolean)
1092              when true, lftp sends 5-argument `SITE  UTIME'  command  to  set
1093              file modification time on uploaded files. Default is true.
1094
1095       ftp:use-site-utime2 (boolean)
1096              when  true,  lftp  sends  2-argument `SITE UTIME' command to set
1097              file modification time on uploaded files. Default is  true.   If
1098              5-argument  `SITE  UTIME' is also enabled, 2-argument command is
1099              tried first.
1100
1101       ftp:use-size (boolean)
1102              when true (default), lftp uses SIZE command  to  determine  file
1103              size.
1104
1105       ftp:use-stat (boolean)
1106              if  true,  lftp  sends STAT command in FXP mode transfer to know
1107              how much data has been transferred. See also  ftp:stat-interval.
1108              Default is true.
1109
1110       ftp:use-stat-for-list (boolean)
1111              when  true,  lftp  uses STAT instead of LIST command. By default
1112              `.' is used as STAT argument. Using STAT, lftp  avoids  creating
1113              data connection for directory listing. Some servers require spe‐
1114              cial options for STAT,  use  ftp:list-options  to  specify  them
1115              (e.g. -la).
1116
1117       ftp:use-telnet-iac (boolean)
1118              when  true  (default),  lftp uses TELNET IAC command and follows
1119              TELNET protocol as specified in RFC959. When false, it does  not
1120              follow TELNET protocol and thus does not double 255 (0xFF, 0377)
1121              character and does not prefix ABOR and STAT commands with TELNET
1122              IP+SYNCH signal.
1123
1124       ftp:use-quit (boolean)
1125              if  true,  lftp sends QUIT before disconnecting from ftp server.
1126              Default is true.
1127
1128       ftp:verify-address (boolean)
1129              verify that data connection comes from the  network  address  of
1130              control  connection peer. This can possibly prevent data connec‐
1131              tion spoofing which can lead to data corruption.  Unfortunately,
1132              this  can  fail  for  certain  ftp  servers with several network
1133              interfaces, when they  do  not  set  outgoing  address  on  data
1134              socket, so it is disabled by default.
1135
1136       ftp:verify-port (boolean)
1137              verify that data connection has port 20 (ftp-data) on its remote
1138              end.  This can possibly  prevent  data  connection  spoofing  by
1139              users  of  remote host. Unfortunately, too many windows and even
1140              unix ftp servers forget to set proper port on  data  connection,
1141              thus this check is off by default.
1142
1143       ftp:web-mode (boolean)
1144              disconnect after closing data connection. This can be useful for
1145              totally broken ftp servers. Default is false.
1146
1147       ftps:initial-prot (string)
1148              specifies initial PROT setting for FTPS connections.  Should  be
1149              one  of:  C,  S,  E,  P,  or empty. Default is empty which means
1150              unknown, so that lftp will use PROT command unconditionally.  If
1151              PROT  command turns out to be unsupported, then Clear mode would
1152              be assumed.
1153
1154       hftp:cache (boolean)
1155              allow server/proxy side caching for ftp-over-http protocol.
1156
1157       hftp:cache-control (string)
1158              specify corresponding HTTP request header.
1159
1160       hftp:proxy (URL)
1161              specifies http proxy for ftp-over-http protocol (hftp). The pro‐
1162              tocol hftp cannot work without a http proxy, obviously.  Default
1163              value is taken from environment variable ftp_proxy if it  starts
1164              with    ``http://'',   otherwise   from   environment   variable
1165              http_proxy.  If your ftp proxy requires authentication,  specify
1166              user name and password in the URL.
1167
1168       hftp:use-authorization (boolean)
1169              if  set  to  off,  lftp will send password as part of URL to the
1170              proxy. This may be required  for  some  proxies  (e.g.  M-soft).
1171              Default is on, and lftp will send password as part of Authoriza‐
1172              tion header.
1173
1174       hftp:use-head (boolean)
1175              if set to off, lftp will try to use `GET' instead of `HEAD'  for
1176              hftp  protocol.  While this is slower, it may allow lftp to work
1177              with some proxies which don't  understand  or  mishandle  ``HEAD
1178              ftp://'' requests.
1179
1180       hftp:use-mkcol (boolean)
1181              if  set to off, lftp will try to use `PUT' instead of `MKCOL' to
1182              create directories with hftp protocol. Default is off.
1183
1184       hftp:use-propfind (boolean)
1185              if set to off, lftp will not try to use `PROPFIND' to get direc‐
1186              tory  contents with hftp protocol and use `GET' instead. Default
1187              is off.
1188
1189       hftp:use-type (boolean)
1190              If set to off, lftp won't try to append `;type=' to URLs  passed
1191              to  proxy.   Some  broken  proxies  don't  handle  it correctly.
1192              Default is on.
1193
1194       http:accept, http:accept-charset, http:accept-language (string)
1195              specify corresponding HTTP request headers.
1196
1197       http:authorization (string)
1198              the authorization to use by default, when no user is  specified.
1199              The format is ``user:password''. Default is empty which means no
1200              authorization.
1201
1202       http:cache (boolean)
1203              allow server/proxy side caching.
1204
1205       http:cache-control (string)
1206              specify corresponding HTTP request header.
1207
1208       http:cookie (string)
1209              send this cookie to server. A closure is useful here:
1210                   set cookie/www.somehost.com "param=value"
1211
1212       http:post-content-type (string)
1213              specifies value of Content-Type http  request  header  for  POST
1214              method.  Default is ``application/x-www-form-urlencoded''.
1215
1216       http:proxy (URL)
1217              specifies  http proxy. It is used when lftp works over http pro‐
1218              tocol.   Default  value  is  taken  from  environment   variable
1219              http_proxy.  If your proxy requires authentication, specify user
1220              name and password in the URL.
1221
1222       http:put-method (PUT or POST)
1223              specifies which http method to use on put.
1224
1225       http:put-content-type (string)
1226              specifies value of Content-Type  http  request  header  for  PUT
1227              method.
1228
1229       http:referer (string)
1230              specifies  value for Referer http request header. Single dot `.'
1231              expands to current directory URL. Default is `.'. Set  to  empty
1232              string to disable Referer header.
1233
1234       http:set-cookies (boolean)
1235              if  true,  lftp  modifies  http:cookie variables when Set-Cookie
1236              header is received.
1237
1238       http:use-mkcol (boolean)
1239              if set to off, lftp will try to use `PUT' instead of `MKCOL'  to
1240              create directories with http protocol. Default is on.
1241
1242       http:use-propfind (boolean)
1243              if set to off, lftp will not try to use `PROPFIND' to get direc‐
1244              tory contents with http protocol and use `GET' instead.  Default
1245              is on.
1246
1247       http:user-agent (string)
1248              the string lftp sends in User-Agent header of HTTP request.
1249
1250       https:proxy (string)
1251              specifies  https  proxy. Default value is taken from environment
1252              variable https_proxy.
1253
1254       mirror:dereference (boolean)
1255              when true, mirror will dereference symbolic  links  by  default.
1256              You  can  override  it  by  --no-dereference  option. Default if
1257              false.
1258
1259       mirror:exclude-regex (regex)
1260              specifies default exclusion pattern.  You  can  override  it  by
1261              --include option.
1262
1263       mirror:include-regex (regex)
1264              specifies  default inclusion pattern. It is used just after mir‐
1265              ror:exclude-regex  is  applied.  It  is  never  used   if   mir‐
1266              ror:exclude-regex is empty.
1267
1268       mirror:order (list of patterns)
1269              specifies  order  of file transfers. E.g. setting this to "*.sfv
1270              *.sum" makes mirror to transfer files matching *.sfv first, then
1271              ones  matching *.sum and then all other files. To process direc‐
1272              tories after other files, add "*/" to end of pattern list.
1273
1274       mirror:parallel-directories (boolean)
1275              if true, mirror will start processing of several directories  in
1276              parallel  when it is in parallel mode. Otherwise, it will trans‐
1277              fer files from a single directory before moving to other  direc‐
1278              tories.
1279
1280       mirror:parallel-transfer-count (number)
1281              specifies  number  of  parallel  transfers  mirror is allowed to
1282              start. Default is  1.   You  can  override  it  with  --parallel
1283              option.
1284
1285       mirror:set-permissions (boolean)
1286              When  set  to  off,  mirror won't try to copy file and directory
1287              permissions.  You can override it by --perms option. Default  is
1288              on.
1289
1290       mirror:use-pget-n (number)
1291              specifies -n option for pget command used to transfer every sin‐
1292              gle file under mirror. Default is 1 which disables pget.
1293
1294       module:path (string)
1295              colon separated list of directories to look for modules. Can  be
1296              initialized by environment variable LFTP_MODULE_PATH. Default is
1297              `PKGLIBDIR/VERSION:PKGLIBDIR'.
1298
1299       net:connection-limit (number)
1300              maximum number of concurrent connections to  the  same  site.  0
1301              means unlimited.
1302
1303       net:connection-takeover (boolean)
1304              if  true,  foreground  connections have priority over background
1305              ones and can interrupt background transfers to complete a  fore‐
1306              ground operation.
1307
1308       net:idle (time interval)
1309              disconnect  from  server after this idle time. Default is 3 min‐
1310              utes.
1311
1312       net:limit-rate (bytes per second)
1313              limit transfer rate on data connection. 0 means  unlimited.  You
1314              can specify two numbers separated by colon to limit download and
1315              upload rate separately.
1316
1317       net:limit-max (bytes)
1318              limit accumulating of unused limit-rate. 0 means twice of limit-
1319              rate.
1320
1321       net:limit-total-rate (bytes per second)
1322              limit  transfer  rate  of all connections in sum. 0 means unlim‐
1323              ited. You can specify two numbers separated by  colon  to  limit
1324              download  and  upload  rate  separately.  Note that sockets have
1325              receive buffers on them, this can  lead  to  network  link  load
1326              higher  than  this rate limit just after transfer beginning. You
1327              can try to set net:socket-buffer to relatively  small  value  to
1328              avoid this.
1329
1330       net:limit-total-max (bytes)
1331              limit  accumulating of unused limit-total-rate. 0 means twice of
1332              limit-total-rate.
1333
1334       net:max-retries (number)
1335              the maximum number of sequential retries of an operation without
1336              success.  0 means unlimited.
1337
1338       net:no-proxy (string)
1339              contains  comma separated list of domains for which proxy should
1340              not  be  used.   Default  is  taken  from  environment  variable
1341              no_proxy.
1342
1343       net:persist-retries (number)
1344              ignore  this number of hard errors. Useful to login to buggy ftp
1345              servers which reply 5xx when there is too many users.
1346
1347       net:reconnect-interval-base (seconds)
1348              sets the base minimal time between reconnects.  Actual  interval
1349              depends   on  net:reconnect-interval-multiplier  and  number  of
1350              attempts to perform an operation.
1351
1352       net:reconnect-interval-max (seconds)
1353              sets maximum reconnect interval.  When  current  interval  after
1354              multiplication  by net:reconnect-interval-multiplier reachs this
1355              value (or exceeds it), it is reset back to  net:reconnect-inter‐
1356              val-base.
1357
1358       net:reconnect-interval-multiplier (real number)
1359              sets  multiplier  by which base interval is multiplied each time
1360              new attempt to perform an operation  fails.  When  the  interval
1361              reachs  maximum,  it  is reset to base value. See net:reconnect-
1362              interval-base and net:reconnect-interval-max.
1363
1364       net:socket-bind-ipv4 (ipv4 address)
1365              bind all IPv4 sockets to specified address. This can  be  useful
1366              to  select a specific network interface to use. Default is empty
1367              which means not to bind  IPv4  sockets,  operating  system  will
1368              choose an address automatically using routing table.
1369
1370       net:socket-bind-ipv6 (ipv6 address)
1371              the same for IPv6 sockets.
1372
1373       net:socket-buffer (bytes)
1374              use  given  size  for  SO_SNDBUF and SO_RCVBUF socket options. 0
1375              means system default.
1376
1377       net:socket-maxseg (bytes)
1378              use given size for TCP_MAXSEG socket option. Not  all  operating
1379              systems support this option, but linux does.
1380
1381       net:timeout (time interval)
1382              sets the network protocol timeout.
1383
1384       pget:default-n (number)
1385              default number of chunks to split the file to in pget.
1386
1387       pget:save-status (time interval)
1388              save  pget transfer status this often. Set to `never' to disable
1389              saving of the status file.  The status is saved to a  file  with
1390              suffix .lftp-pget-status.
1391
1392       sftp:charset (string)
1393              the  character  set  used  by sftp server in file names and file
1394              listings.  Default is empty which means the same as local.  This
1395              setting  is only used for sftp protocol version prior to 4. Ver‐
1396              sion 4 and later always use UTF-8.
1397
1398       sftp:connect-program (string)
1399              the program to use for connecting to remote  server.  It  should
1400              support `-l' option for user name, `-p' for port number. Default
1401              is `ssh -a -x'. You can set it to `rsh', for example.
1402
1403       sftp:max-packets-in-flight (number)
1404              The maximum number of unreplied packets in flight. If round trip
1405              time   is  significant,  you  should  increase  this  and  size-
1406              read/size-write. Default is 16.
1407
1408       sftp:protocol-version (number)
1409              The protocol number to negotiate. Default is 4. The actual  pro‐
1410              tocol version used depends on server.
1411
1412       sftp:server-program (string)
1413              The  server  program  implementing SFTP protocol. If it does not
1414              contain a slash `/', it is considered a ssh2  subsystem  and  -s
1415              option  is  used  when  starting  connect-program.   Default  is
1416              `sftp'. You can use rsh as transport level protocol like this:
1417                   set sftp:connect-program rsh
1418                   set sftp:server-program /usr/libexec/openssh/sftp-server
1419              Similarly you can run sftp over ssh1.
1420
1421       sftp:size-read (number)
1422              Block size for reading. Default is 0x8000.
1423
1424       sftp:size-write (number)
1425              Block size for writing. Default is 0x8000.
1426
1427       ssl:ca-file (path to file)
1428              use specified file as Certificate Authority certificate.
1429
1430       ssl:ca-path (path to directory)
1431              use specified directory  as  Certificate  Authority  certificate
1432              repository (OpenSSL only).
1433
1434       ssl:check-hostname (boolean)
1435              when  true,  lftp checks if the host name used to connect to the
1436              server corresponds to the host name in its certificate.
1437
1438       ssl:crl-file (path to file)
1439              use specified file as Certificate Revocation List certificate.
1440
1441       ssl:crl-path (path to directory)
1442              use specified directory as Certificate Revocation List  certifi‐
1443              cate repository (OpenSSL only).
1444
1445       ssl:key-file (path to file)
1446              use specified file as your private key.
1447
1448       ssl:cert-file (path to file)
1449              use specified file as your certificate.
1450
1451       ssl:verify-certificate (boolean)
1452              if  set to yes, then verify server's certificate to be signed by
1453              a known Certificate Authority and not be on Certificate  Revoca‐
1454              tion List.
1455
1456       ssl:priority (string)
1457              free  form priority string for GnuTLS. If built with OpenSSL the
1458              understood values are + or - followed by SSL3.0, TLS1.0,  TLS1.1
1459              or TLS1.2, separated by :. Example:
1460                   set ssl:priority "NORMAL:-SSL3.0:-TLS1.0:-TLS1.1:+TLS1.2"
1461
1462       torrent:ip (ipv4 address)
1463              IP  address for the tracker. Specify it if you are using an http
1464              proxy.
1465
1466       torrent:max-peers (number)
1467              maximum number of peers for a  torrent.  Least  used  peers  are
1468              removed to maintain this limit.
1469
1470       torrent:port-range (from-to)
1471              port  range  to accept connections on. A single port is selected
1472              when a torrent starts.
1473
1474       torrent:seed-max-time (time interval)
1475              maximum seed time. After this period of time a complete  torrent
1476              shuts  down independently of ratio. It can be set to infinity if
1477              needed.
1478
1479       torrent:seed-min-peers (number)
1480              minimum number of peers when the torrent is complete.  If  there
1481              are less, new peers are actively searched for.
1482
1483       torrent:stop-on-ratio (real number)
1484              torrent stops when it's complete and ratio reached this number.
1485
1486       xfer:auto-rename(boolean)
1487              suggested  filenames  provided  by  the  server are used if user
1488              explicitly sets this option to `on'. As this could  be  security
1489              risk, default is off.
1490
1491       xfer:clobber (boolean)
1492              if this setting is off, get commands will not overwrite existing
1493              files and generate an error instead.
1494
1495       xfer:destination-directory (path or URL to directory)
1496              This setting is used as default -O option for get and mget  com‐
1497              mands.   Default  is empty, which means current directory (no -O
1498              option).
1499
1500       xfer:full-disk-fatal (boolean)
1501              when true, lftp aborts a thansfer if it cannot write target file
1502              because  of  full disk or quota; when false, lftp waits for disk
1503              space to be freed.
1504
1505       xfer:eta-period (seconds)
1506              the period over which weighted average  rate  is  calculated  to
1507              produce ETA.
1508
1509       xfer:eta-terse (boolean)
1510              show terse ETA (only high order parts). Default is true.
1511
1512       xfer:log (boolean)
1513              when true, lftp logs transfers to ~/.lftp/transfer_log.
1514
1515       xfer:max-redirections (number)
1516              maximum number of redirections. This can be useful for download‐
1517              ing over HTTP.  0 prohibits redirections.
1518
1519       xfer:rate-period (seconds)
1520              the period over which weighted average rate is calculated to  be
1521              shown.
1522
1523
1524       The  name of a variable can be abbreviated unless it becomes ambiguous.
1525       The prefix before `:' can be omitted too. You can set one variable sev‐
1526       eral  times  for  different closures, and thus you can get a particular
1527       settings for particular state. The closure is  to  be  specified  after
1528       variable name separated with slash `/'.
1529
1530       The  closure  for `dns:', `net:', `ftp:', `http:', `hftp:' domain vari‐
1531       ables is currently just the host name as you specify it in  the  `open'
1532       command  (with  some  exceptions  where  closure  is  meaningless, e.g.
1533       dns:cache-size).  For some `cmd:' domain variables the closure is  cur‐
1534       rent  URL  without path.  For other variables it is not currently used.
1535       See examples in the sample lftp.conf.
1536
1537       Certain commands and settings take a time interval  parameter.  It  has
1538       the  format Nx[Nx...], where N is time amount (floating point) and x is
1539       time unit: d - days, h - hours, m - minutes, s - seconds. Default  unit
1540       is  second.  E.g.  5h30m or 5.5h.  Also the interval can be `infinity',
1541       `inf', `never', `forever' - it means  infinite  interval.  E.g.  `sleep
1542       forever' or `set dns:cache-expire never'.
1543
1544       Boolean  settings  can be one of (true, on, yes, 1, +) for a True value
1545       or one of (false, off, no, 0, -) for a False value.
1546
1547       Integer settings can have a suffix: k - kibi, m - mebi, g - gigi,  etc.
1548       They can also have a prefix: 0 - octal, 0x - hexadecimal.
1549
1550
1551   FTP asynchronous mode (pipelining)
1552       Lftp  can  speed  up ftp operations by sending several commands at once
1553       and then checking all the responses. See ftp:sync-mode variable.  Some‐
1554       times this does not work, thus synchronous mode is the default. You can
1555       try to turn synchronous mode off and see if it works  for  you.  It  is
1556       known that some network software dealing with address translation works
1557       incorrectly in the case of several FTP commands in one network packet.
1558
1559       RFC959 says: ``The user-process sending another command before the com‐
1560       pletion  reply  would  be in violation of protocol; but server-FTP pro‐
1561       cesses should queue any commands that arrive while a preceding  command
1562       is  in  progress''.  Also, RFC1123 says: ``Implementors MUST NOT assume
1563       any correspondence between READ boundaries on  the  control  connection
1564       and  the  Telnet  EOL sequences (CR LF).'' and ``a single READ from the
1565       control connection may include more than one FTP command''.
1566
1567       So it must be safe to send several commands at once,  which  speeds  up
1568       operation  a  lot  and  seems  to  work with all Unix and VMS based ftp
1569       servers. Unfortunately, windows based servers often cannot handle  sev‐
1570       eral commands in one packet, and so cannot some broken routers.
1571
1572

OPTIONS

1574       -d     Switch on debugging mode
1575
1576       -e commands
1577              Execute given commands and don't exit.
1578
1579       -p port
1580              Use the given port to connect
1581
1582       -u user[,pass]
1583              Use the given username and password to connect
1584
1585       -f script_file
1586              Execute commands in the file and exit
1587
1588       -c commands
1589              Execute  the  given commands and exit. Commands can be separated
1590              with a semicolon, `&&' or `||'.
1591
1592

ENVIRONMENT VARIABLES

1594       The following environment variables are processed by lftp:
1595
1596       HOME   Used for (local) tilde (`~') expansion
1597
1598       SHELL  Used by the ! command to determine the shell to run.
1599
1600       PAGER  This should be the name of the pager to use.  It's used  by  the
1601              more and zmore commands.
1602
1603       http_proxy, https_proxy
1604              Used to set initial http:proxy, hftp:proxy and https:proxy vari‐
1605              ables.
1606
1607       ftp_proxy
1608              Used to set initial ftp:proxy or hftp:proxy variables, depending
1609              on URL protocol used in this environment variable.
1610
1611       no_proxy
1612              Used to set initial net:no-proxy variable.
1613
1614       LFTP_MODULE_PATH
1615              Used to set initial module:path variable.
1616
1617       LFTP_HOME
1618              Used  to locate the directory that stores user-specific configu‐
1619              ration files.  If unset, ~/.lftp will be used.
1620
1621       LS_COLORS
1622              used to set initial color:dir-colors variable.
1623
1624

FILES

1626       /etc/lftp.conf
1627              system-wide   startup   file.   Actual   location   depends   on
1628              --sysconfdir  configure  option. It is /etc when prefix is /usr,
1629              /usr/local/etc by default.
1630
1631
1632       ~/.lftp/rc, ~/.lftprc
1633              These files are executed on lftp startup after /etc/lftp.conf.
1634
1635       ~/.lftp/log
1636              The file things are logged to when lftp  moves  into  the  back‐
1637              ground in nohup mode.
1638
1639       ~/.lftp/transfer_log
1640              The file transfers are logged to when xfer:log setting is set to
1641              `yes'.
1642
1643       ~/.lftp/bookmarks
1644              The file is used to store lftp's bookmarks.   See  the  bookmark
1645              command.
1646
1647       ~/.lftp/cwd_history
1648              The file is used to store last working directories for each site
1649              visited.
1650
1651       ~/.netrc
1652              The file is consulted to get default login and password  to  ftp
1653              server.   Passwords  are  also searched here if an URL with user
1654              name but with no password is used.
1655
1656

SEE ALSO

1658       ftpd(8), ftp(1)
1659       RFC854 (telnet), RFC959 (ftp),  RFC1123,  RFC1945  (http/1.0),  RFC2052
1660       (SRV  RR),  RFC2228  (ftp  security  extensions),  RFC2389  (ftp FEAT),
1661       RFC2428  (ftp/ipv6),  RFC2518  (WebDAV),  RFC2616  (http/1.1),  RFC2617
1662       (http/1.1 authentication), RFC2640 (ftp i18n), RFC4217 (ftp over ssl).
1663       http://www.ietf.org/internet-drafts/draft-ietf-ftpext-mlst-16.txt (ftp
1664       extensions over RFC959),
1665       http://www.ietf.org/internet-drafts/draft-ietf-secsh-filexfer-10.txt
1666       (sftp).
1667       http://wiki.theory.org/BitTorrentSpecification
1668
1669

AUTHOR

1671       Alexander V. Lukyanov
1672       lav@yars.free.net
1673
1674

ACKNOWLEDGMENTS

1676       This  manual  page  was originally written by Christoph Lameter <clame‐
1677       ter@debian.org>, for the Debian GNU/Linux system. The page was improved
1678       and  updated  later by Nicolas Lichtmaier <nick@Feedback.com.ar>, James
1679       Troup   <J.J.Troup@comp.brad.ac.uk>   and   Alexander    V.    Lukyanov
1680       <lav@yars.free.net>.
1681
1682
1683
1684                                  10 Jun 2010                          lftp(1)
Impressum