Current location - Music Encyclopedia - Chinese History - CMD command about FTP. Heaven/God knows
CMD command about FTP. Heaven/God knows
Classification: Computer/Network >> Internet

Problem description:

CMD command about FTP. Heaven/God knows

Analysis:

FTP command is one of the most commonly used commands for Internet users. Familiarity with and flexible application of FTP internal commands can greatly facilitate users and get twice the result with half the effort.

If you want to learn to download in the background using FTP, then you must learn FTP instructions.

The command line format of FTP is FTP-v-d-I-n-g[ host name].

Where -v displays all the response information of the remote server;

-n Restrict ftp automatic login, that is, do not use it; . N etrc file;

-d use debug mode;

-g Cancels the global file name.

FTP uses the following internal commands (parentheses indicate options):

1.! [cmd[args & gt; : execute an interactive shell on the local machine, and exit returns to the ftp environment, such as:! ls*。 vitality

2.$ macro-ame[args]: execute macro to define macro name.

3.account[password]: After successfully logging in to the remote system, provide the supplementary password needed to access the system resources.

4. Append local file [remote file]: Append local file to remote system host. If the remote system file name is not specified, the local file name will be used.

5.ascii: Use the transmission mode of ascii type.

6. Bell: Every time a command is executed, the computer rings.

7.bin: Use binary file transfer mode.

8.bye: Exit the ftp session process.

9.case: When using mget, the uppercase letters in the file name of the remote host are converted into lowercase letters.

10.cd remote-dir: enter the remote host directory.

1 1.cdup: Enter the parent directory of the remote host directory.

12.chmod mode file name: set the access mode of remote host file name as mode, such as chmod777a.out. ..

13.close: Interrupt ftp session with remote server (corresponding to open).

14.cr: When asscii transfers files, carriage returns and line feeds are converted into carriage returns.

15. Delete the remote file: delete the remote host file.

16.debug[debug-value]: Set the debug mode and display each command sent to the remote host, such as deb up 3. If set to 0, it means that debugging is cancelled.

17.dir [remote-dir] [local-file]: Displays the remote host directory and stores the result in a local file.

18. opening: same as closing.

19.form format: set the file transfer mode as format, and the default is file mode.

20. Obtain remote file [local file]: transfer the remote file of the remote host to the local file of the local hard disk.

2 1.glob: set the file extensions of mdelete, mget and mput. By default, the file name is not extended, which is the same as the -g parameter on the command line.

22.hash: A hash symbol (#) is displayed every 1024 bytes transmitted.

23.help[cmd]: displays the help information of ftp internal command cmd, such as: help get.

24.idle[seconds]: Set the sleep timer of the remote server to [seconds] seconds.

25.image: Set the binary transmission mode (same as binary).

26.lcd[dir]: Switch the local working directory to dir.

27.ls[remote-dir][local-file]: displays the remote directory remote-dir and saves it in the local file local-file.

28.macdef macro name: define a macro. When a blank line under macdef is encountered, the macro definition ends.

29.mdelete[remote-file]: Delete the remote host file.

30.mdir remote-files local-file: similar to dir, but multiple remote files can be specified, such as mdir *. o *。 zipoutfile。

3 1.mget remote-files: transfer multiple remote files.

32.mkdir dir-name: Create a directory in the remote host.

33.mls remote-file local-file: same as nlist, but multiple file names can be specified.

34.mode[modename]: Set the file transfer mode to modename, and the default mode is streaming mode.

35.modtime file name: displays the last modification time of the remote host file.

36.mput local-file: transfer multiple files to a remote host.

37. Newer file name: If the file name in the remote machine is modified later than the file with the same name in the local hard disk, the file will be retransmitted.

38. nlist [remote-dir] [local-file]: displays the file list of the remote host directory and stores it in the local file of the local hard disk.

39.nmap[inpattern outpattern]: Set the file name mapping mechanism, so that some characters in the file can be converted to each other during file transmission, such as nmap $ 1. $2.$3[$ 1, $2].[$2, $3], the file a 65438+ is transmitted. This command is especially suitable for the case that the remote host is a non-UNIX machine.

n trans[in chars]out chars & gt; : Set the translation mechanism of file name characters, such as ntrans 1R, and the file name LLL will become RRR.

4 1.open host[port]: establish a connection to the specified ftp server, and you can specify the connection port.

42. Passive: Enter the passive transmission mode.

43. Prompt: Set the interactive prompt when transferring multiple files.

44. Proxy ftp-cmd: In the auxiliary control connection, the ftp command is executed, which allows two ftp servers to be connected to transfer files between them. The first ftp command must be turned on in order to establish a connection between the two servers first.

45.put local-file[remote-file]: Send the local file local-file to the remote host.

46.pwd: Displays the current working directory of the remote host.

47.quit: like bye, quit the ftp session.

Reference arg 1, arg2 ...: Send parameters word for word to a remote ftp server, such as quote syst.

49.recv remote-file[local-file]: same as get.

50. Reget remote-file [local-file]: Similar to get, but if local-file exists, it will resume from the last transmission interruption.

5 1.rhelp[cmd-name]: Ask the remote host for help.

52.rstatus[file-name]: If no file name is specified, the status of the remote host will be displayed, otherwise, the status of the file will be displayed.

53.rename[from][to]: Change the remote host file name.

54. Reset: Clear the reply queue.

55.restart marker: restart get or put from the specified marker, such as restart 130.

Rmdir dir-name: delete the remote host directory.

57.runique: Set the file name to be stored only once. If the file exists, please add the suffix. 1, .2, etc. To the original file.

58. Sending local files [remote files]: same as uploading.

59.sendPORT: set the use of port commands.

60.site arg 1, arg2 ...: Send the parameters to the remote ftp host word by word as a site command.

6 1.size file name: displays the file size of the remote host, for example, site idle 7200.

Status: displays the current ftp status.

63.struct[struct-name]: Set the file transfer structure to struct-name, and use the stream structure by default.

64.sunique: Set the remote host file name storage to only one (corresponding to runique).

System: Displays the operating system type of the remote host.

66.tenex: Set the file transfer type to the required tenex machine type.

67.tick: Set the byte counter during transmission.

68.trace: set the package trace.

69.type[type-name]: set the file transfer type as type-name, and the default is ascii, such as type binary, and set the binary transfer mode.

70.umask[newmask]: set the default umask of the remote server to newmask, such as umask 3.

71.useruser-name [password] [account]: Identify yourself to the remote host. If you need a password, be sure to enter it, for example, user anonymous my@email.

72.verbose: It is the same as the -v parameter on the command line, that is, it sets the detailed report mode and displays all the responses of the ftp server to the user. The default value is ON.

73.? [cmd]: Same as help.