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

OPTIONS

1436       -d     Switch on debugging mode
1437
1438       -e commands
1439              Execute given commands and don't exit.
1440
1441       -p port
1442              Use the given port to connect
1443
1444       -u user[,pass]
1445              Use the given username and password to connect
1446
1447       -f script_file
1448              Execute commands in the file and exit
1449
1450       -c commands
1451              Execute the given commands and exit
1452
1453

ENVIRONMENT VARIABLES

1455       The following environment variables are processed by lftp:
1456
1457       HOME   Used for (local) tilde (`~') expansion
1458
1459       SHELL  Used by the ! command to determine the shell to run.
1460
1461       PAGER  This  should  be the name of the pager to use.  It's used by the
1462              more and zmore commands.
1463
1464       http_proxy, https_proxy
1465              Used to set initial http:proxy, hftp:proxy and https:proxy vari‐
1466              ables.
1467
1468       ftp_proxy
1469              Used to set initial ftp:proxy or hftp:proxy variables, depending
1470              on URL protocol used in this environment variable.
1471
1472       no_proxy
1473              Used to set initial net:no-proxy variable.
1474
1475       LFTP_MODULE_PATH
1476              Used to set initial module:path variable.
1477
1478       LFTP_HOME
1479              Used to locate the directory that stores user-specific  configu‐
1480              ration files.  If unset, ~/.lftp will be used.
1481
1482

FILES

1484       /etc/lftp.conf
1485              system-wide   startup   file.   Actual   location   depends   on
1486              --sysconfdir configure option. It is /etc when prefix  is  /usr,
1487              /usr/local/etc by default.
1488
1489
1490       ~/.lftp/rc, ~/.lftprc
1491              These files are executed on lftp startup after /etc/lftp.conf.
1492
1493       ~/.lftp/log
1494              The  file  things  are  logged to when lftp moves into the back‐
1495              ground in nohup mode.
1496
1497       ~/.lftp/bookmarks
1498              The file is used to store lftp's bookmarks.   See  the  bookmark
1499              command.
1500
1501       ~/.lftp/cwd_history
1502              The file is used to store last working directories for each site
1503              visited.
1504
1505       ~/.netrc
1506              The file is consulted to get default login and password  to  ftp
1507              server.   Passwords  are  also searched here if an URL with user
1508              name but with no password is used.
1509
1510

SEE ALSO

1512       ftpd(8), ftp(1)
1513       RFC854 (telnet), RFC959 (ftp),  RFC1123,  RFC1945  (http/1.0),  RFC2052
1514       (SRV  RR),  RFC2228  (ftp  security  extensions),  RFC2389  (ftp FEAT),
1515       RFC2428  (ftp/ipv6),  RFC2518  (WebDAV),  RFC2616  (http/1.1),  RFC2617
1516       (http/1.1 authentication), RFC2640 (ftp i18n), RFC4217 (ftp over ssl).
1517       http://www.ietf.org/internet-drafts/draft-ietf-ftpext-mlst-16.txt (ftp
1518       extensions over RFC959),
1519       http://www.ietf.org/internet-drafts/draft-ietf-secsh-filexfer-10.txt
1520       (sftp).
1521
1522

AUTHOR

1524       Alexander V. Lukyanov
1525       lav@yars.free.net
1526
1527

ACKNOWLEDGMENTS

1529       This  manual  page  was originally written by Christoph Lameter <clame‐
1530       ter@debian.org>, for the Debian GNU/Linux system. The page was improved
1531       and  updated  later by Nicolas Lichtmaier <nick@Feedback.com.ar>, James
1532       Troup   <J.J.Troup@comp.brad.ac.uk>   and   Alexander    V.    Lukyanov
1533       <lav@yars.free.net>.
1534
1535
1536
1537                                  22 Aug 2006                          lftp(1)
Impressum