CentOS 多线程下载工具 lftp

lftp 使用方法:

# lftp -c "pget -n 10 http://www.21andy.com/test.tar.gz"

-c 表示断点续传
-n10 表示10线程

lftp 安装:

# yum -y install lftp

装好后看一下
# lftp-v

LFTP | Version 3.7.11 | Copyright (c) 1996-2009 Alexander V.Lukyanov

LFTP is free software: you can redistribute it and/ormodify
it under the terms of the GNU General Public License as publishedby
the Free Software Foundation, either version 3 of the License,or
(at your option) any later version.

This program is distributed in the hope that it will beuseful,
but WITHOUT ANY WARRANTY; without even the implied warrantyof
MERCHANTABILITY or FITNESS FOR A PARTICULARPURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General PublicLicense
along with LFTP.  If not, see .

Send bug reports and questions to the mailing list .

Libraries used: Readline 5.1

# manlftp

NAME
      lftp - Sophisticated file transferprogram

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

VERSION
      This man page documents lftp version3.7.7.

DESCRIPTION
      lftp  is a  file  transfer program thatallows sophisticated ftp, http and other connections to otherhosts. If site is specified then lftp will connect to that siteotherwise a connection has to be estab-
      lished with the open command.

      lftp can handle several file access methods -ftp, ftps, http, https, hftp, fish, sftp and file (https and ftpsare only available when lftp is compiled with GNU TLS or OpenSSLlibrary). You can specify the
      method  to use  in  ‘open URL’  command, e.g.  ‘open http://www.us.kernel.org/pub/linux’. hftp  is ftp-over-http-proxy  protocol. It  can  be used automatically instead of ftp if ftp:proxy is set to
      ‘http://proxy[:port]’. Fish is a protocolworking over an ssh connection to a unix account. SFtp is aprotocol implemented in ssh2 as sftp subsystem.

      Every operation in lftp is reliable, that is anynot fatal error is ignored and the operation is repeated. So ifdownloading breaks, it will be restarted from the pointautomatically.  Even if  ftp  server
      does not support REST command, lftp will try toretrieve the file from the very beginning until the file istransferred completely.

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

      If you exit lftp when some jobs are not finishedyet, lftp will move itself to nohup mode in background. The samehappens when you have a real modem hangup or when you close anxterm.

      lftp  has builtin mirror whichcan download or update a whole directory tree. There is alsoreverse mirror (mirror -R) which uploads or updates a directorytree on server. Mirror can also synchronize direc-
      tories between two remote servers, using FXP ifavailable.

      There is command ‘at’ to launch a job atspecified time in current context, command ‘queue’ to queuecommands for sequential execution for current server, and muchmore.

      On startup, lftp executes /etc/lftp.conf andthen ~/.lftprc and ~/.lftp/rc. You can place aliases and ‘set’commands there. Some people prefer to see full protocol debug, use‘debug’ to turn the  debug on.
      Use ‘debug 3’ to see only greeting messages anderror messages.

      lftp  has  anumber of settable variables. You can use ‘set -a’ to see allvariables and their values or ‘set -d’ to see list ofdefaults.  Variable names can be abbreviated andprefix can be omitted unless
      the rest becomes ambiguous.

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

你可能感兴趣的:(linux,linux)