
正文
linux中lftp命令的简单介绍
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
linux lftp mirror命令的问题
如果是存在相同文件名的文件.他会判断文件的日期.会覆盖为最新的文件.
如果没有修改过,就不会覆盖.
这个是做镜像用的.就是保持ftp上的文件和你本地的文件是完全一样的.
相关问答
Q1: Linux中lftp命令
ncftp 工具linux中lftp命令的使用
ftp 全名为 File Transfer Protocol(档案传输协定)linux中lftp命令,File Transfer Protocol 主要的功用是在 TCP/IP 网路上传送档案linux中lftp命令,常见的 ftp 工具有 ,ftp gftp lftp ncftp mc proz wget 等。档案传输在系统管理及运用上十分常见,请务必学会其中一种,以下以 ncftp 示范。
##########################################################################
行前教育
ncftp 的使用方法与 command line 下的 Bash 用法相近,以下是常用指令:
cd 切换目录
mkdir 建立目录
rmdir 砍掉空目录
del 砍掉档案
get 取回档案
put 将档案放上去
##########################################################################
使用 ncftp 登入需帐号密码的 ftp server
语法为 ncftp -u USERNAME IP-address
or
语法为 ncftp -u USERNAME Hostname
##########################################################################
lloyd@alver:~$ ncftp -u lloyd 127.0.0.1
NcFTP 3.1.3 (Mar 27, 2002) by Mike Gleason (ncftp@nc).
Connecting to 127.0.0.1...
alver.coventive.com FTP server (Version 6.4/OpenBSD/Linux-ftpd-0.17) ready.
Logging in...
Password requested by 127.0.0.1 for user "lloyd".
Password required for lloyd.
Password: ## 输入密码 ##
Linux alver 2.4.18 #22 周六 8月 3 10:58:28 CST 2002 i686 unknown
Most of the programs included with the Debian GNU/Linux system are
freely redistributable; the exact distribution terms for each program
are described in the individual files in /usr/share/doc/*/copyright
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
User lloyd logged in.
Logged in to 127.0.0.1.
ncftp /home/lloyd cd DOC/ # 切换目录到 DOC
ncftp /home/lloyd/DOC ls # 列出该目录下的档案与目录
123/ LLOYD/ tech-report.ps VCD
5_SGML/ minigateway/ user_manual.pdf XRoadTerm/
i18n/ radius/ user_manual.ps XRoadTerm.tar.gz
ncftp /home/lloyd/DOC help # 线上求助
Commands may be abbreviated. 'help showall' shows hidden and unsupported
commands. 'help command' gives a brief description of command.
ascii cat help lpage open quote site
bgget cd jobs lpwd page rename type
bgput chmod lcd lrename pdir rhelp umask
bgstart close lchmod lrm pls rm version
binary debug lls lrmdir put rmdir
bookmark dir lmkdir ls pwd set
bookmarks get lookup mkdir quit show
ncftp /home/lloyd/DOC get XRoadTerm.tar.gz # 以 get 取回 XRoadTerm.tar.gz 档案
XRoadTerm.tar.gz: 20.50 kB 563.41 kB/s
ncftp /home/lloyd/DOC quit # 离开
You have not saved a bookmark for this site.
Would you like to save a bookmark to:
Save? (yes/no) no # 要储存帐号密码当成 bookmark 使用吗?
# 建议回答 no
Not saved. (If you don't want to be asked this, "set confirm-close no")
lloyd@alver:~$ ls -l XRoadTerm.tar.gz # 回到 shell 下,查看档案是否抓回来linux中lftp命令了
-rw-r--r-- 1 lloyd lloyd 20993 6月 24 14:19 XRoadTerm.tar.gz
lloyd@alver:~$
##########################################################################
使用 ncftp 登入提供 anonymous 的 ftp server (公众使用无须帐号密码的 ftp
server )
语法为 ncftp P-address
or
语法为 ncftp Hostname
以下以中山 ftp server 为例:
##########################################################################
lloyd@alver:~$ ncftp # 除了这里不同外其余用法相同
NcFTP 3.1.3 (Mar 27, 2002) by Mike Gleason (ncftp@nc).
Connecting to 140.117.11.7...
====================================================================
欢迎光临档案伺服器.
Welcome to National Sun Yat-Sen University FTP Server ().
右列网址提供本站档案搜寻引擎
File Search Engine on the URL
目前 FTP 部份有 289 人正在线上,最高限制 5000 人.
There are currently 289 users out of 5000 possible.
====================================================================
Only anonymous FTP is allowed here. Please login as 'ftp'.
Logging in...
========================================================================
!!!! Important Function !!!! (重要功能介绍)
o 'cd key*word' or 'cd prefix*' or 'cd *suffix' provided (case-insentive).
(例:cd freebsd 可以打成 cd fr 或 cd *sd 或 cd f*e*d 都通用,大小写都行)
========================================================================
请多多利用 A HREF=""/A
可以使用方便的档案搜寻引擎喔!!!!!!!!!!!!!!!!!
========================================================================
ADM.Email: ftpadm@cc.nsysu.edu.tw
Anonymous user (202.145.53.89) logged in
Unknown command
Logged in to .
ncftp /pub cd Windows
ncftp /pub/Windows ls
Collection/ Mobile@ SAC@ WindowsNT/
Demo/ MsDownload/ Simtelnet/ Winsock-l/
ncftp /pub/Windows cd Collection/
ncftp /pub/Windows/Collection ls
CDR-Soft/ Image/ MultiMedia/ Sound/
Driver/ LIB/ Network/ WWW/
ncftp /pub/Windows/Collection quit
You have not saved a bookmark for this site.
Would you like to save a bookmark to:
Save? (yes/no) no
Not saved. (If you don't want to be asked this, "set confirm-close no")
lloyd@alver:~$
请参考,希望能帮到你。
Q2: linux怎么安装lftp命令
红帽系(RHEL/CentOS等)直接执行
yum -y install lftp
就可以了(当然前提是能联网或者有本地yum源)
也可以用DVD镜像里的lftp安装包离线安装。
关于linux中lftp命令和的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。






