Andy's Blog » centos 下载工具, centos下载工具, centos 多线程下载, lftp, CentOS lftp, lftp 多线程, centos 多线程下载工具, centos多线程下载, lftp centos, centos 多线程 下载工具, 下载工具 » CentOS 多线程下载工具 lftp

CentOS 多线程下载工具 lftp

lftp 使用方法:

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

-c 表示断点续传
-n 10 表示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/or modify
it under the terms of the GNU General Public License as published by
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 be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with LFTP.  If not, see <http://www.gnu.org/licenses/>.

Send bug reports and questions to the mailing list <[email protected]>.

Libraries used: Readline 5.1

# man lftp

NAME
       lftp - Sophisticated file transfer program

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 version 3.7.7.

DESCRIPTION
       lftp  is  a  file  transfer program that allows sophisticated ftp, http and other connections to other hosts. If site is specified then lftp will connect to that site otherwise 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 ftps are only available when lftp is compiled with GNU TLS or OpenSSL library). 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 protocol working over an ssh connection to a unix account. SFtp is a protocol implemented in ssh2 as sftp subsystem.

       Every operation in lftp is reliable, that is any not fatal error is ignored and the operation is repeated. So if downloading breaks, it will be restarted from the point automatically.  Even  if  ftp  server
       does not support REST command, lftp will try to retrieve the file from the very beginning until the file is transferred completely.

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

       If you exit lftp when some jobs are not finished yet, lftp will move itself to nohup mode in background. The same happens when you have a real modem hangup or when you close an xterm.

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

       There is command ‘at’ to launch a job at specified time in current context, command ‘queue’ to queue commands for sequential execution for current server, and much more.

       On startup, lftp executes /etc/lftp.conf and then ~/.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 and error messages.

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

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

Incoming search terms:

Tags: centos, lftp, 多线程

本文地址: http://blog.21andy.com/20100922/1962.html

1 评论 to “PHP开源CMS之MODx”

  1. 拆墙部队 于 2010-09-23 11:19:15 发表:

    Lftp 在连接 Https 的时候还要用到 Open SSL 有点麻烦,这个下载还算全能,Linux 里不错的东西了。