linux怎么安装lftp命令

linux怎么安装lftp命令,第1张

红帽系(RHEL/CentOS等)直接执行

yum -y install lftp

就可以了(当然前提是能联网或者有本地yum源)

也可以用DVD镜像里的lftp安装包离线安装。

cp /etc/lftp.conf ~/.config/lftp

这样就可以正常使用了。

我用root用户使用lftp一切正常,用普通用户时出现你说的情况,一通折腾后发现~/.config目录下有个lftp目录,但是里面没有lftp的配置文件,于是把/etc下的lftp.conf拷贝到~/.config/lftp下,然后用普通用户使用lftp,就一切正常了。

ncftp 工具的使用

ftp 全名为 File Transfer Protocol(档案传输协定),File Transfer Protocol 主要的功用是在 TCP/IP 网路上传送档案,常见的 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 ([email protected]).

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 redistributablethe 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.pdfXRoadTerm/

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 cathelp lpage open quote site

bgget cd jobs lpwd page rename type

bgput chmod lcdlrenamepdir rhelp umask

bgstartclose lchmod lrmplsrm version

binary debug llslrmdir putrmdir

bookmark dirlmkdir ls pwdset

bookmarks getlookup 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:

ftp://lloyd:[email protected]/DOC/

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 下,查看档案是否抓回来了

-rw-r--r--1 lloydlloyd 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 ftp.nsysu.edu.tw # 除了这里不同外其余用法相同

NcFTP 3.1.3 (Mar 27, 2002) by Mike Gleason ([email protected]).

Connecting to 140.117.11.7...

====================================================================

欢迎光临档案伺服器.

Welcome to National Sun Yat-Sen University FTP Server (ftp.nsysu.edu.tw).

右列网址提供本站档案搜寻引擎

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: [email protected]

Anonymous user (202.145.53.89) logged in

Unknown command

Logged in to ftp.nsysu.edu.tw.

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:

ftp://ftp.nsysu.edu.tw/Windows/Collection/

Save? (yes/no) no

Not saved. (If you don't want to be asked this, "set confirm-close no")

lloyd@alver:~$

请参考,希望能帮到你。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/7275368.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-03
下一篇 2023-04-03

发表评论

登录后才能评论

评论列表(0条)

保存