ncftp 强大的 ftp 客户端程序

作用

ncftp 程序的作用是让用户得以与远程 ftp 服务器主机间通过 ftp 协议下载或上传文件。ncftp 是文字模式 ftp 程序的佼佼者,其具备多样特色,包括显示传输速率、下载进度、自动续传、标注书签、可通过防火墙和代理服务器等。

当不指定用户名时,ncftp 命令会自动尝试使用匿名账户 anonymous 去连接远程FTP 服 务器,不需要用户输入账号和密码。

语法

ncftp [参数] [主机名称或IP地址]

参数

  • -u<用户名>  指定登录FTP服务器的用户名

  • -p<密码>  设置用户密码

  • -P<端口号>  指定FTP端口号,默认为21

  • -j<账号>  指定账号

  • -h  帮助信息

  • -v  版本信息

示例

(1)使用 ncftp 命令登录到 192.168.1.3 远程主机,命令如下:

[root@hxstrive bin]# ./ncftp -u root -p 123456 192.168.1.3
NcFTP 3.2.6 (Dec 04, 2016) by Mike Gleason (http://www.NcFTP.com/contact/).
Connecting to 192.168.1.3...
EldoS SecureBlackbox FTPS服务器就绪。

库版本12.0.265.0
Logging in...
User logged in, proceed.
Logged in to 192.168.1.3.
ncftp / > ls
anaconda-ks.cfg

(2)使用 ncftp 的 get 子命令将远程主机 192.168.1.3 中的 test.txt 下载到本地当前目录,如下:

ncftp / > get test.txt
test.txt:                                  6 bytes    4.98 kB/s

(3)使用 ncftp 的 help 子命令列举 ncftp 支持的子命令,还可以使用“help command”查询某个子命令的帮助信息。如下:

ncftp / > help
Commands may be abbreviated.  'help showall' shows hidden and unsupported
commands.  'help <command>' gives a brief description of <command>.

ascii      cat        get        lookup     mkdir      pwd        set
bgget      cd         help       lpage      open       quit       show
bgput      chmod      jobs       lpwd       page       quote      site
bgstart    close      lcd        lrename    passive    rename     type
binary     debug      lchmod     lrm        pdir       rhelp      umask
bookmark   dir        lls        lrmdir     pls        rm         version
bookmarks  edit       lmkdir     ls         put        rmdir

For details, please see the manual ("man ncftp" at your regular shell prompt
or online at  

# 查看 dir 子命令的帮助信息
ncftp / > help dir
dir: prints a verbose directory listing.
Usage: dir [items to list]

For details, please see the manual ("man ncftp" at your regular shell prompt
or online at http://www.NcFTP.com/ncftp/doc/ncftp.html).

更多关于命令详细参考手册,请使用 man 命令或者 --help 参数获取帮助信息

关于
本网站属于个人的非赢利性网站,转载的文章遵循原作者的版权声明,如果原文没有版权声明,请来信告知:hxstrive@outlook.com
公众号