名字→ncftp 版本→3.2.0 ;类型中| 1 网络 | 2 文件工作 | 3 系统 | 4 服务器 | 5 多媒体 | 6 其他 | 类型→1→ftp客户端 简介→ncftp是ftp客户端工具,比传统的ftp好的多 相关url→http://www.ncftp.com $:$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 详细介绍和用法: AIX操作系统提供了ftp客户端工具usrbinftp,但是这个工具使用起来不是非常方便。本文介绍一种在世界上广泛使用的ftp命令行客户 端软件ncftp,它提供更方便、快捷、强大的功能,使我们在使用ftp服务的时候更得心应手。ncftp广泛应用于各个版本的Linux上,IBM公司也 把它放在了AIX Linux Toolbox中,用户可以从httpwww-1.ibm.comserversaixproductsaixoslinuxaltlic.html下载到这个软件,IBM 目前提供的ncftp版本是3.1.1。 ncftp与传统的ftp相比,主要有以下改进或变化: 1、子目录下载,采用递归的方法,下载整个目录及其子目录。 2、支持断点续传。一次传输没有完成,下次可以接着传输未完成的文件。 3、匿名ftp自动登录。目前大部分ftp站点都可以匿名登录,ncftp可以自动登录(默认方式)。 4、支持通过防火墙传输和代理服务器。 5、支持书签功能,可以将某个位置存在书签中方便以后直接跳转。 6、可以显示下载进度。 7、显示传输速率。 8、文件列表自动满页暂停。当ls文件列表超过一屏,ncftp会自动暂停,等待任意键继续。 9、默认是以binary方式传输数据。 10、支持文件名自动完成。例如服务器上有文件download.list,您只要输入get downTAB,系统可以自动填充文件名为download.list。 11、自动记忆站点的离开时的目录,下次登录会自动进入那个目录。 下面我们就详细介绍一下如何使用ncftp进行日常的ftp工作。ncftp的命令行语法是:ncftp [flags] [host directory URL to browse]。flags常见的包括: -u XX 使用用户名XX代替匿名。 -p XX 使用密码XX代替默认密码。 -P XX 使用端口XX,默认端口是21。 -d XX 如果连接不上,间隔XX秒重试。 -g XX 重试XX次。 使用ncftp -u root 192.168.0.1就会登录到主机192.168.0.1上了,系统会提示输入root密码: NcFTP 3.1.1(Dec 23, 2001) by Mike Gleason (ncftp@ncftp.com). Copyright (c) 1992-2001 by Mike Gleason. All rights reserved. Connecting to 192.168.0.1... Test_FTP FTP server (Version 4.1 Sat Sep 7 143153 CDT 2002) ready. Logging in... Password requested by 192.168.0.1 for user root. Password required for root. Password Last unsuccessful login Tue Sep 23 105502 2003 on devpts1 from 192.168.0.5 Last login Tue Sep 23 152605 2003 on ftp from XXXX.cn.ibm.com User root logged in. Logged in to 192.168.0.1. ncftp ncftp的基本命令和普通ftp一样,可以输入help获得命令列表。对于所有的命令,都可以使用help 命令的格式获得详细帮助。输入version可以获得版本相关信息。这里详细介绍一下几个增强的命令。 1、bookmark 书签名:这个命令用于将当前连接的位置设置为一个书签,下次连接,只需要在AIX的命令行下输入ncftp 书签名 就可以了 。bookmark 的信息是放在 ~.ncftpbookmarks 中,可以自己更改。 2、get:get 命令在ncftp中得到了增强。输入get 可以下载当前目录的所有内容,输入get -R 目录名,可以将目录下的所有文件和子目 录下载。使用bgget命令可以在指定时间下载文件。 3、增加的本地文件系统的操作命令:lls:列出本地当前目录文件;lmkdir:本地建立目录;lrename:本地文件改名;lpwd:显示当前本地路 径;lchmod:改变本地文件权限;lpage:显示本地文件内容;lrm:删除本地文件;lrmdir:删除本地目录。 4、增加的远程文件系统的操作命令:chmod:同AIX的chmod;page:同AIX的page;rm:删除文件;rmdir:删除目录;umask:设置掩码。 5、显示改变系统设置:使用showset命令可以显示改变缺省的ncftp系统设置。 注意事项:ncftp是一个免费软件,IBM公司不提供对此软件的维护和技术支持服务。 NcFTPLs 3.2.0 Usages: ncftpls [FTP flags] [-x "ls flags"] ftp://url.style.host/path/name/ ls Flags: -m Use machine readable (MLSD) list format, if the server supports it. -1 Most basic format, one item per line. -l Long list format. -C Columnized list format (default). -R Long list format, recurse subdirectories if server allows it. -g Recursive and print one path per line; like "/usr/bin/find . -print" -gg As above, but append a "/" character to directory pathnames. -a Show all files, if server allows it (as in "/bin/ls -a"). -i XX Filter the listing (if server supports it) with the wildcard XX. -x XX List command flags to use on the remote server. FTP Flags: -u XX Use username XX instead of anonymous. -p XX Use password XX with the username. -P XX Use port number XX instead of the default FTP service port (21). -j XX Use account XX with the account (deprecated). -d XX Use the file XX for debug logging. -t XX Timeout after XX seconds. -f XX Read the file XX for user and password information. -E Use regular (PORT) data connections. -F Use passive (PASV) data connections (default). -K Show disk usage by attempting SITE DF. -o XX Specify miscellaneous options (see documentation). -W XX Send raw FTP command XX after logging in. -X XX Send raw FTP command XX after each listing. -Y XX Send raw FTP command XX before logging out. -r XX Redial XX times until connected. Examples: ncftpls ftp://ftp.freebsd.org/pub/FreeBSD/ ncftpls -1 ftp://ftp.freebsd.org/pub/FreeBSD/ ncftpls -la -i '*.TXT' ftp://ftp.freebsd.org/pub/FreeBSD/ ncftpls -m ftp://ftp.ncftp.com/ncftpd/ ncftpls -x "-lrt" ftp://ftp.freebsd.org/pub/FreeBSD/ Note: The standard specifies that URL pathnames are are relative pathnames. For FTP, this means that URLs specify relative pathnames from the start directory, which for user logins, are typically the user's home directory. If you want to use absolute pathnames, you need to include a literal slash, using the "%2F" code for a "/" character. Examples: ncftpls -u linus ftp://ftp.kernel.org/%2Fusr/src/ ncftpls ftp://steve@ftp.apple.com/%2Fetc/ Library version: LibNcFTP 3.2.0 (August 5, 2006). This is a freeware program by Mike Gleason (http://www.ncftp.com). This was built using LibNcFTP (http://www.ncftp.com/libncftp/). NcFTPPut 3.2.0 Usages: ncftpput [flags] remote-host remote-dir local-files... (mode 1) ncftpput -f login.cfg [flags] remote-dir local-files... (mode 2) ncftpput -c remote-host remote-path-name < stdin (mode 3) ncftpput -C remote-host local-path-name remote-path-name (mode 4) Flags: -u XX Use username XX instead of anonymous. -p XX Use password XX with the username. -P XX Use port number XX instead of the default FTP service port (21). -j XX Use account XX with the account (deprecated). -d XX Use the file XX for debug logging. -e XX Use the file XX for error logging. -U XX Use value XX for the umask. -t XX Timeout after XX seconds. -a Use ASCII transfer type instead of binary. -m Attempt to mkdir the dstdir before copying. -v/-V Do (do not) use progress meters. -f XX Read the file XX for host, user, and password information. -h XX Connect to host XX. Useful for overriding host in -f config.file. -c Read locally from stdin and write remotely to specified pathname. -C Similar to -c, except a local pathname is specified. -A Append to remote files instead of overwriting them. -z/-Z Do (do not) try to resume uploads (default: -Z). -T XX Upload into temporary files prefixed by XX. -S XX Upload into temporary files suffixed by XX. -DD Delete local file after successfully uploading it. -b Run in background (submit job to "ncftpbatch" and run). -bb Same as "-b" but queue only (do not run "ncftpbatch"). -E Use regular (PORT) data connections. -F Use passive (PASV) data connections (default). -y Try using "SITE UTIME" to preserve timestamps on remote host. -B XX Try setting the SO_SNDBUF size to XX. -r XX Redial XX times until connected. -o XX Specify miscellaneous options (see documentation). -W XX Send raw FTP command XX after logging in. -X XX Send raw FTP command XX after each file transferred. -Y XX Send raw FTP command XX before logging out. -R Recursive mode; copy whole directory trees. Examples: ncftpput -u gleason -p my.password Elwood.probe.net /home/gleason stuff.txt ncftpput -u gleason Elwood.probe.net /home/gleason a.txt (prompt for pass) ncftpput -a -u gleason -p my.password -m -U 007 Bozo.probe.net /tmp/tmpdir a.txt tar cvf - /home | ncftpput -u operator -c Server.probe.net /backups/monday.tar Library version: LibNcFTP 3.2.0 (August 5, 2006). This is a freeware program by Mike Gleason (http://www.ncftp.com). This was built using LibNcFTP (http://www.ncftp.com/libncftp/). NcFTPGet 3.2.0 Usages: ncftpget [flags] remote-host local-dir remote-path-names... (mode 1) ncftpget -f login.cfg [flags] local-dir remote-path-names... (mode 2) ncftpget [flags] ftp://url.style.host/path/name (mode 3) ncftpget -c [flags] remote-host remote-path-name > stdout (mode 4) ncftpget -C [flags] remote-host remote-path-name local-path-name (mode 5) ncftpget -c [flags] ftp://url.style.host/path/name > stdout (mode 6) Flags: -u XX Use username XX instead of anonymous. -p XX Use password XX with the username. -P XX Use port number XX instead of the default FTP service port (21). -d XX Use the file XX for debug logging. -a Use ASCII transfer type instead of binary. -t XX Timeout after XX seconds. -v/-V Do (do not) use progress meters. -f XX Read the file XX for host, user, and password information. -h XX Connect to host XX. Useful for overriding host in -f config.file. -c Read from remote host and write locally to stdout. -C Read from remote host and write locally to specified file. -A Append to local files, instead of overwriting them. -z/-Z Do (do not) try to resume downloads (default: -z). -E Use regular (PORT) data connections. -F Use passive (PASV) data connections (default). -DD Delete remote file after successfully downloading it. -b Run in background (submit job to "ncftpbatch" and run). -bb Same as "-b" but queue only (do not run "ncftpbatch"). -B XX Try setting the SO_RCVBUF size to XX. -r XX Redial XX times until connected. -o XX Specify miscellaneous options (see documentation). -W XX Send raw FTP command XX after logging in. -X XX Send raw FTP command XX after each file transferred. -Y XX Send raw FTP command XX before logging out. -R Recursive mode; copy whole directory trees. -T Do not try to use TAR mode with Recursive mode. Examples: ncftpget ftp.freebsd.org . /pub/FreeBSD/README.TXT /pub/FreeBSD/index.html ncftpget ftp.gnu.org /tmp '/pub/gnu/README.*' ncftpget ftp://ftp.freebsd.org/pub/FreeBSD/README.TXT ncftpget -R ftp.ncftp.com /tmp /ncftp (ncftp is a directory) ncftpget -u gleason -p my.password Bozo.probe.net . '/home/mjg/.*rc' ncftpget -u gleason Bozo.probe.net . /home/mjg/foo.txt (prompt for password) ncftpget -f Bozo.cfg '/home/mjg/.*rc' ncftpget -c ftp.freebsd.org /pub/FreeBSD/README.TXT | /usr/bin/more ncftpget -c ftp://ftp.freebsd.org/pub/FreeBSD/README.TXT | /usr/bin/more ncftpget -a -d /tmp/debug.log -t 60 ftp.wustl.edu . '/pub/README*' Library version: LibNcFTP 3.2.0 (August 5, 2006). This is a freeware program by Mike Gleason (http://www.ncftp.com). This was built using LibNcFTP (http://www.ncftp.com/libncftp/).