China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-25 04:50
中国DOS联盟论坛 » DOS媒体世界 & 网络技术 (多媒体室) » Complete Collection of FTP Commands (Reprinted) DigestI View 6,061 Replies 9
Original Poster Posted 2002-10-31 00:00 ·  中国 北京 中国科学院物理研究所
中级用户
Credits 224
Posts 19
Joined 2002-10-17 00:00
23-year member
UID 18
Gender Male
Status Offline
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.
Floor 2 Posted 2002-10-31 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Is it the one in the "DOS Articles" section?
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 3 Posted 2002-10-31 00:00 ·  中国 北京 中国科学院物理研究所
中级用户
Credits 224
Posts 19
Joined 2002-10-17 00:00
23-year member
UID 18
Gender Male
Status Offline
Some internal commands have been added ^_^
Floor 4 Posted 2003-11-26 00:00 ·  中国 山西 太原 联通
初级用户
1#DIY
Credits 104
Posts 2
Joined 2003-11-26 00:00
22-year member
UID 13378
Gender Male
Status Offline
Oh. In the future, please produce more technical articles.
Floor 5 Posted 2003-12-19 00:00 ·  中国 山西 太原 联通
初级用户
Credits 106
Posts 2
Joined 2003-12-19 00:00
22-year member
UID 14213
Gender Male
Status Offline
Hope that experts can post more examples so that newcomers can learn!
Floor 6 Posted 2004-02-04 00:00 ·  中国 河南 新乡 联通
初级用户
Credits 130
Posts 7
Joined 2004-02-04 00:00
22-year member
UID 16656
Gender Male
Status Offline
Very valuable
Floor 7 Posted 2010-02-10 10:59 ·  中国 广东 深圳 电信
新手上路
Credits 19
Posts 13
Joined 2010-02-08 09:46
16-year member
UID 160332
Gender Male
Status Offline
Let me let out a coarse word: Damn, I forgot this command, I'm angry, I regret, I destroy
Floor 8 Posted 2010-04-06 18:24 ·  中国 河南 驻马店 联通
初级用户
Credits 26
Posts 14
Joined 2010-03-13 14:24
16-year member
UID 162152
Gender Male
From 河南
Status Offline
Thanks to the LZ, I've learned.
Floor 9 Posted 2010-04-06 20:04 ·  中国 广东 佛山 顺德区 电信
初级用户
★★
Credits 151
Posts 106
Joined 2009-10-09 21:24
16-year member
UID 152856
Gender Male
From 河南省
Status Offline
steersman is right. When giving commands, add a few more examples. Novices can easily understand, grasp, and learn.
Floor 10 Posted 2010-04-29 14:05 ·  中国 江苏 南京 电信
初级用户
Credits 22
Posts 10
Joined 2010-04-08 15:30
16-year member
UID 164074
Gender Male
Status Offline
Very useful!
Forum Jump: