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

OPTIONS

1710       -d     Switch on debugging mode.
1711
1712       -e commands
1713              Execute given commands and don't exit.
1714
1715       -p port
1716              Use the given port to connect.
1717
1718       -u user[,pass]
1719              Use the given username and  password  to  connect.  Remember  to
1720              quote  the password properly in the shell.  Also note that it is
1721              not secure to specify the password on command line, use ~/.netrc
1722              file.  Alternatively you can use ssh-based protocols with autho‐
1723              rized keys, so you don't have to enter a password.
1724
1725       -f script_file
1726              Execute commands in the file and exit.  This option must be used
1727              alone without other arguments.
1728
1729       -c commands
1730              Execute  the  given commands and exit. Commands can be separated
1731              with a semicolon, `&&' or `||'. Remember to quote  the  commands
1732              argument  properly in the shell.  This option must be used alone
1733              without other arguments.
1734
1735

ENVIRONMENT VARIABLES

1737       The following environment variables are processed by lftp:
1738
1739       HOME   Used for (local) tilde (`~') expansion
1740
1741       SHELL  Used by the ! command to determine the shell to run.
1742
1743       PAGER  This should be the name of the pager to use.  It's used  by  the
1744              more and zmore commands.
1745
1746       http_proxy, https_proxy
1747              Used to set initial http:proxy, hftp:proxy and https:proxy vari‐
1748              ables.
1749
1750       ftp_proxy
1751              Used to set initial ftp:proxy or hftp:proxy variables, depending
1752              on URL protocol used in this environment variable.
1753
1754       no_proxy
1755              Used to set initial net:no-proxy variable.
1756
1757       LFTP_MODULE_PATH
1758              Used to set initial module:path variable.
1759
1760       LFTP_HOME
1761              Used  to locate the directory that stores user-specific configu‐
1762              ration files.  If unset, ~/.lftp will be used.
1763
1764       LS_COLORS
1765              used to set initial color:dir-colors variable.
1766
1767

FILES

1769       /etc/lftp.conf
1770              system-wide   startup   file.   Actual   location   depends   on
1771              --sysconfdir  configure  option. It is /etc when prefix is /usr,
1772              /usr/local/etc by default.
1773
1774
1775       ~/.lftp/rc, ~/.lftprc
1776              These files are executed on lftp startup after /etc/lftp.conf.
1777
1778       ~/.lftp/log
1779              The file things are logged to when lftp  moves  into  the  back‐
1780              ground in nohup mode.
1781
1782       ~/.lftp/transfer_log
1783              The file transfers are logged to when xfer:log setting is set to
1784              `yes'.  The location can be changed by xfer:log-file setting.
1785
1786       ~/.lftp/bookmarks
1787              The file is used to store lftp's bookmarks.   See  the  bookmark
1788              command.
1789
1790       ~/.lftp/cwd_history
1791              The file is used to store last working directories for each site
1792              visited.
1793
1794       ~/.lftp/bg/
1795              The directory is used to store named  sockets  for  backgrounded
1796              lftp processes.
1797
1798       ~/.netrc
1799              The  file  is consulted to get default login and password to ftp
1800              server.  Passwords are also searched here if an  URL  with  user
1801              name but with no password is used.
1802
1803

SEE ALSO

1805       ftpd(8), ftp(1)
1806       RFC854  (telnet),  RFC959  (ftp),  RFC1123, RFC1945 (http/1.0), RFC2052
1807       (SRV RR),  RFC2228  (ftp  security  extensions),  RFC2389  (ftp  FEAT),
1808       RFC2428  (ftp/ipv6),  RFC2518  (WebDAV),  RFC2616  (http/1.1),  RFC2617
1809       (http/1.1 authentication), RFC2640 (ftp i18n), RFC4217 (ftp over ssl).
1810       http://www.ietf.org/internet-drafts/draft-ietf-ftpext-mlst-16.txt (ftp
1811       extensions over RFC959),
1812       http://www.ietf.org/internet-drafts/draft-ietf-secsh-filexfer-10.txt
1813       (sftp).
1814       http://wiki.theory.org/BitTorrentSpecification
1815       http://www.bittornado.com/docs/multitracker-spec.txt
1816
1817

AUTHOR

1819       Alexander V. Lukyanov
1820       lav@yars.free.net
1821
1822

ACKNOWLEDGMENTS

1824       This manual page was originally written by  Christoph  Lameter  <clame‐
1825       ter@debian.org>, for the Debian GNU/Linux system. The page was improved
1826       and updated later by Nicolas Lichtmaier  <nick@Feedback.com.ar>,  James
1827       Troup    <J.J.Troup@comp.brad.ac.uk>    and   Alexander   V.   Lukyanov
1828       <lav@yars.free.net>.
1829
1830
1831
1832                                  19 Oct 2011                          lftp(1)
Impressum