CentOS 多线程下载工具 lftp
2013-10-11 16:09
369 查看
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
4000
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/)
# 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
4000
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/)
相关文章推荐
- CentOS6.4 安装aria2多线程下载工具
- linux下多线程下载工具lftp
- Ubuntu下的多线程下载工具:MultiGet;并与 Firefox 建立关联
- 自己开发的在线视频下载工具,基于Java多线程
- Linux下多线程,断点续传,命令行下载工具axel
- Linux : 多线程下载工具: axel
- linux下多线程下载工具axel的编译安装
- centos 下配置ftp服务后 xftp工具无法上传与下载
- CentOS配环境变量(针对MacOS,Windows类似,请自行下载连接Linux的工具)
- ubuntu多线程下载工具
- 多线程下载工具之 Axel
- centos 7 上传下载小工具
- mwget 多线程版本wget下载工具
- 关于下载工具的多线程问题
- Axel多线程下载工具使用详解
- Centos上传下载小工具lrzsz
- Linux下多线程下载工具
- ubuntu上三个类似迅雷的多线程下载工具
- 命令行下多线程下载工具 Axel 2.4 for Windows
- Linux下的多线程下载工具mwget