『楼 主』:
ftp命令全集(转载)
使用 LLM 解释/回答一下
FTP命令全集
FTP命令是Internet用户使用最频繁的命令之一,熟悉并灵活应用FTP的内部命令,可以大大方便使用者,并收到事半功倍之效。
如果你想学习使用进行后台FTP下载,那么就必须学习FTP指令。
FTP的命令行格式为: ftp -v -d -i -n -g ,
其中 -v 显示远程服务器的所有响应信息;
-n 限制ftp的自动登录,即不使用;.n etrc文件;
-d 使用调试方式;
-g 取消全局文件名。
FTP使用的内部命令如下(中括号表示可选项):
1.!
: 执行宏定义macro-name。
3.account: 提供登录远程系统成功后访问系统资源所需的补充口令。
4.append local-file:将本地文件追加到远程系统主机,若未指定远程系统文件名,则使用本地文件名。
5.ascii:使用ascii类型传输方式。
6.bell:每个命令执行完毕后计算机响铃一次。
7.bin:使用二进制文件传输方式。
8.bye:退出ftp会话过程。
9.case:在使用mget时,将远程主机文件名中的大写转为小写字母。
10.cd remote-dir:进入远程主机目录。
11.cdup:进入远程主机目录的父目录。
12.chmod mode file-name:将远程主机文件file-name的存取方式设置为mode,如:chmod 777 a.out。
13.close:中断与远程服务器的ftp会话(与open对应)。
14.cr:使用asscii方式传输文件时,将回车换行转换为回行。
15.delete remote-file:删除远程主机文件。
16.debug:设置调试方式, 显示发送至远程主机的每条命令,如:deb up 3,若设为0,表示取消debug。
17.dir:显示远程主机目录,并将结果存入本地文件
18.disconnection:同close。
19.form format:将文件传输方式设置为format,缺省为file方式。
20.get remote-file: 将远程主机的文件remote-file传至本地硬盘的local-file。
21.glob:设置mdelete,mget,mput的文件名扩展,缺省时不扩展文件名,同命令行的-g参数。
22.hash:每传输1024字节,显示一个hash符号(#)。
23.help:显示ftp内部命令cmd的帮助信息,如:help get。
24.idle:将远程服务器的休眠计时器设为秒。
25.image:设置二进制传输方式(同binary)。
26.lcd:将本地工作目录切换至dir。
27.ls:显示远程目录remote-dir, 并存入本地文件local-file。
28.macdef macro-name:定义一个宏,遇到macdef下的空行时,宏定义结束。
29.mdelete:删除远程主机文件。
30.mdir remote-files local-file:与dir类似,但可指定多个远程文件,如 :mdir *.o.*.zipoutfile 。
31.mget remote-files:传输多个远程文件。
32.mkdir dir-name:在远程主机中建一目录。
33.mls remote-file local-file:同nlist,但可指定多个文件名。
34.mode:将文件传输方式设置为modename, 缺省为stream方式。
35.modtime file-name:显示远程主机文件的最后修改时间。
36.mput local-file:将多个文件传输至远程主机。
37.newer file-name: 如果远程机中file-name的修改时间比本地硬盘同名文件的时间更近,则重传该文件。
38.nlist:显示远程主机目录的文件清单,并存入本地硬盘的local-file。
39.nmap:设置文件名映射机制, 使得文件传输时,文件中的某些字符相互转换, 如:nmap $1.$2.$3.,则传输文件a1.a2.a3时,文件名变为a1,a2。 该命令特别适用于远程主机为非UNIX机的情况。
40.ntrans
:建立指定ftp服务器连接,可指定连接端口。
42.passive:进入被动传输方式。
43.prompt:设置多个文件传输时的交互提示。
44.proxy ftp-cmd:在次要控制连接中,执行一条ftp命令, 该命令允许连接两个ftp服务器,以在两个服务器间传输文件。第一条ftp命令必须为open,以首先建立两个服务器间的连接。
45.put local-file:将本地文件local-file传送至远程主机。
46.pwd:显示远程主机的当前工作目录。
47.quit:同bye,退出ftp会话。
48.quote arg1,arg2...:将参数逐字发至远程ftp服务器,如:quote syst.
49.recv remote-file:同get。
50.reget remote-file:类似于get, 但若local-file存在,则从上次传输中断处续传。
51.rhelp:请求获得远程主机的帮助。
52.rstatus:若未指定文件名,则显示远程主机的状态, 否则显示文件状态。
53.rename:更改远程主机文件名。
54.reset:清除回答队列。
55.restart marker:从指定的标志marker处,重新开始get或put,如:restart 130。
56.rmdir dir-name:删除远程主机目录。
57.runique:设置文件名只一性存储,若文件存在,则在原文件后加后缀.1, .2等。
58.send local-file:同put。
59.sendport:设置PORT命令的使用。
60.site arg1,arg2...:将参数作为SITE命令逐字发送至远程ftp主机。
61.size file-name:显示远程主机文件大小,如:site idle 7200。
62.status:显示当前ftp状态。
63.struct:将文件传输结构设置为struct-name, 缺省时使用stream结构。
64.sunique:将远程主机文件名存储设置为只一(与runique对应)。
65.system:显示远程主机的操作系统类型。
66.tenex:将文件传输类型设置为TENEX机的所需的类型。
67.tick:设置传输时的字节计数器。
68.trace:设置包跟踪。
69.type:设置文件传输类型为type-name,缺省为ascii,如:type binary,设置二进制传输方式。
70.umask:将远程服务器的缺省umask设置为newmask,如:umask 3
71.user user-name:向远程主机表明自己的身份,需要口令时,必须输入口令,如:user anonymous my@email。
72.verbose:同命令行的-v参数,即设置详尽报告方式,ftp 服务器的所有响 应都将显示给用户,缺省为on.
73.?:同help.
FTP Command Set
FTP commands are one of the most frequently used commands by Internet users. Familiarizing and flexibly applying FTP internal commands can greatly facilitate users and achieve twice the result with half the effort.
If you want to learn to use background FTP download, then you must learn FTP commands.
The command line format of FTP is: ftp -v -d -i -n -g ,
where -v displays all response information of the remote server;
-n restricts automatic login of ftp, that is, does not use the.netrc file;
-d uses the debugging mode;
-g cancels global file names.
The internal commands used by FTP are as follows (brackets indicate optional items):
1.!
:Execute the macro definition macro-name.
3.account:Provide the supplementary password required to access system resources after successfully logging in to the remote system.
4.append local-file:Append the local file to the remote system host. If the remote system file name is not specified, the local file name is used.
5.ascii:Use the ascii type transmission method.
6.bell:The computer rings once after each command is executed.
7.bin:Use the binary file transmission method.
8.bye:Exit the ftp session process.
9.case:When using mget, convert the uppercase letters in the remote host file name to lowercase letters.
10.cd remote-dir:Enter the remote host directory.
11.cdup:Enter the parent directory of the remote host directory.
12.chmod mode file-name:Set the access method of the remote host file file-name to mode, for example: chmod 777 a.out.
13.close:Interrupt the ftp session with the remote server (corresponding to open).
14.cr:When using the asscii method to transfer files, convert the carriage return and line feed to line feed.
15.delete remote-file:Delete the remote host file.
16.debug:Set the debugging mode, display each command sent to the remote host, for example: deb up 3. If set to 0, it means cancel debug.
17.dir:Display the remote host directory and store the result in the local file
18.disconnection:Same as close.
19.form format:Set the file transmission method to format, the default is file method.
20.get remote-file:Transfer the file remote-file of the remote host to the local-file of the local hard disk.
21.glob:Set the file name extension of mdelete, mget, mput. By default, the file name is not extended, which is the same as the -g parameter of the command line.
22.hash:Display a hash symbol (#) every time 1024 bytes are transferred.
23.help:Display the help information of the ftp internal command cmd, for example: help get.
24.idle:Set the dormancy timer of the remote server to seconds.
25.image:Set the binary transmission method (same as binary).
26.lcd:Switch the local working directory to dir.
27.ls:Display the remote directory remote-dir and store it in the local file local-file.
28.macdef macro-name:Define a macro, and the macro definition ends when an empty line under macdef is encountered.
29.mdelete:Delete the remote host file.
30.mdir remote-files local-file:Similar to dir, but multiple remote files can be specified, for example: mdir *.o.*.zipoutfile.
31.mget remote-files:Transfer multiple remote files.
32.mkdir dir-name:Create a directory on the remote host.
33.mls remote-file local-file:Same as nlist, but multiple file names can be specified.
34.mode:Set the file transmission method to modename, the default is stream method.
35.modtime file-name:Display the last modification time of the remote host file.
36.mput local-file:Transfer multiple files to the remote host.
37.newer file-name:If the modification time of file-name in the remote machine is closer than the time of the same name file on the local hard disk, then retransmit the file.
38.nlist:Display the file list of the remote host directory and store it in the local-file of the local hard disk.
39.nmap:Set the file name mapping mechanism, so that some characters in the file are converted to each other during file transmission, for example: nmap $1.$2.$3., then when transferring the file a1.a2.a3, the file name becomes a1, a2. This command is especially suitable for the case where the remote host is a non-UNIX machine.
40.ntrans
:Establish a connection with the specified ftp server, and the connection port can be specified.
42.passive:Enter the passive transmission mode.
43.prompt:Set the interactive prompt when transferring multiple files.
44.proxy ftp-cmd:Execute an ftp command in the secondary control connection. This command allows connecting two ftp servers to transfer files between the two servers. The first ftp command must be open to first establish a connection between the two servers.
45.put local-file:Transfer the local file local-file to the remote host.
46.pwd:Display the current working directory of the remote host.
47.quit:Same as bye, exit the ftp session.
48.quote arg1, arg2...:Send the parameters to the remote ftp server word by word, for example: quote syst.
49.recv remote-file:Same as get.
50.reget remote-file:Similar to get, but if local-file exists, continue transmission from the last interruption.
51.rhelp:Request to obtain the help of the remote host.
52.rstatus:If the file name is not specified, display the status of the remote host, otherwise display the file status.
53.rename:Change the file name of the remote host.
54.reset:Clear the answer queue.
55.restart marker:Restart get or put from the specified flag marker, for example: restart 130.
56.rmdir dir-name:Delete the remote host directory.
57.runique:Set file name unique storage. If the file exists, add suffixes.1, .2, etc. after the original file.
58.send local-file:Same as put.
59.sendport:Set the use of the PORT command.
60.site arg1, arg2...:Send the parameters to the remote ftp host as the SITE command word by word.
61.size file-name:Display the size of the remote host file, for example: site idle 7200.
62.status:Display the current ftp status.
63.struct:Set the file transmission structure to struct-name. By default, the stream structure is used.
64.sunique:Set the remote host file name storage to unique (corresponding to runique).
65.system:Display the operating system type of the remote host.
66.tenex:Set the file transmission type to the type required by the TENEX machine.
67.tick:Set the byte counter during transmission.
68.trace:Set packet tracing.
69.type:Set the file transmission type to type-name. The default is ascii. For example: type binary, set the binary transmission method.
70.umask:Set the default umask of the remote server to newmask, for example: umask 3
71.user user-name:Indicate your identity to the remote host. When a password is required, you must enter the password, for example: user anonymous my@email.
72.verbose:Same as the -v parameter of the command line, that is, set the detailed report mode. All responses of the ftp server will be displayed to the user. The default is on.
73.?:Same as help.
|