Basic FTP command usage

Source: Internet
Author: User
Tags ftp commands remote ftp server runique

FTP commands are one of the most frequently used commands by Internet users. A large number of internal FTP commands are used in both DOS and UNIX operating systems. Familiar with and flexible application of FTP Internal commands can greatly facilitate users and get twice the result with half the effort. The following uses the FTP command in the DOS window of Win9x as an example to describe its usage. (Note: If you want to use FTP commands in pure DOS, you must first load the Packet driver program of the network device, such as the NIC or modem, use the Wattcp FTP program in the "Network tool" on this site. Its usage is similar to that described below. For details, see the "DOS usage" section on this site)

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 indicates that ftp automatic logon is disabled;
. N etrc file;
-D. Use the debugging method;
-G cancels the global file name.
The internal commands used by FTP are as follows (brackets indicate optional ):
1 .! [Cmd [args]: Execute the interactive shell on the local machine and exit to return to the ftp environment, for example :! Ls *. zip
2. $ macro-ame [args]: Execute the macro to define macro-name.
3. account [password]: Provide the supplemental password required to access system resources after logging on to the remote system.
4. append local-file [remote-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: after each command is executed, the computer rings once.
7. bin: Binary File Transfer Mode.
8. bye: exit the ftp session.
9. case: when using mget, convert 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 file-name access mode of the remote host file to mode, for example, chmod 777 a. out.
13. close: interrupt the ftp session with the remote server (corresponding to open ).
14. cr: When a file is transmitted using asscii, the carriage return line is converted into a return line.
15. delete remote-file: delete remote host files.
16. debug [debug-value]: sets the debugging mode. Each Command sent to the remote host is displayed, for example, deb up 3. If it is set to 0, the debug is canceled.
17. dir [remote-dir] [local-file]: displays the remote host directory and saves the result to the local file.
18. disconnection: Same as close.
19. form format: sets the file transmission mode to format. The default mode is file.
20. get remote-file [local-file]: transfers the remote-file of the remote host to the local-file of the local hard disk.
21. glob: Set the extension of the mdelete, mget, and mput file names, which is the same as the-g parameter in the command line.
22. hash: A hash symbol (#) is displayed for every 1024 bytes transferred (#).
23. help [cmd]: displays the help information of the ftp Internal Command cmd, for example, help get.
24. idle [seconds]: Set the Sleep timer of the remote server to [seconds] seconds.
25. image: sets the binary transmission mode (the 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 stores the local-file.
28. macdef macro-name: defines a macro. When an empty row under macdef is encountered, the macro definition ends.
29. mdelete [remote-file]: delete remote host files.
30. mdir remote-files local-file: similar to dir, but multiple remote files can be specified, such as mdir *. o. *. zipoutfile.
31. mget remote-files: Transfers 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 [modename]: sets the file transmission mode to modename. The default mode is stream.
35. modtime file-name: displays the last modification time of the remote host file.
36. mput local-file: Transfers multiple files to the remote host.
37. newer file-name: if the modification time of file-name on the remote machine is closer than that of files with the same name on the local hard disk, the file will be re-transmitted.
38. nlist [remote-dir] [local-file]: displays the list of files in the remote host directory and stores the local-file on the local hard disk.
39. nmap [inpattern outpattern]: sets the file name ing mechanism so that some characters in the file are converted to each other during file transmission, such as nmap $1. $2. $3 [$1, $2]. [$2, $3], transfer the file a1.a2. when a3, the file name is changed to a1, a2. This command is especially applicable when the remote host is not a UNIX host.
40. ntrans [inchars [outchars]: sets the file name character translation mechanism, for example, ntrans1R, then the file name LLL will change to RRR.
41. open host [port]: Specifies the ftp server connection. You can specify the connection port.
42. passive: enters the passive transmission mode.
43. prompt: Set interaction prompts when multiple files are transferred.
44. proxy ftp-cmd: Execute an ftp command in the secondary control connection. This command allows two ftp servers to be connected to transfer files between the two servers. The first ftp command must be open to first establish a connection between two servers.
45. put local-file [remote-file]: transfers the local-file to the remote host.
46. pwd: displays the current working directory of the remote host.
47. quit: Same as bye, quit the ftp session.
48. quote arg1, arg2. ..: Send the parameter to the remote ftp server, for example, quote syst.
49. recv remote-file [local-file]: Same as get.
50. reget remote-file [local-file]: similar to get. However, if local-file exists, it will be resumed from the last transmission interruption.
51. rhelp [cmd-name]: request for help from the remote host.
52. rstatus [file-name]: If no file name is specified, the remote host status is displayed; otherwise, the file status is displayed.
53. rename [from] [to]: Change the remote host file name.
54. reset: Clear the answer queue.
55. restart marker: Start get or put again from the specified mark marker, for example, restart 130.
56. rmdir dir-name: Delete the remote host directory.
57. runique: Set the unique storage of file names. If the file exists, add the suffix. 1 and. 2 to the original file.
58. send local-file [remote-file]: Same as put.
59. sendport: Set the PORT command.
60. site arg1, arg2. ..: Send the parameter to the remote ftp host as the SITE command.
61. size file-name: displays the file size of the remote host, for example, site idle 7200.
62. status: displays the current ftp status.
63. struct [struct-name]: sets the file transmission structure to struct-name, and uses the stream structure due to lack of time.
64. sunique: Set the remote host file name storage to unique (corresponding to runique ).
65. system: displays the operating system type of the remote host.
66. tenex: Set the file transfer type to the required type of the TENEX server.
67. tick: sets the byte counter during transmission.
68. trace: Set package tracing.
69. type [type-name]: sets the file transfer type to type-name. The default value is ascii, for example, type binary. Sets the binary transfer mode.
70. umask [newmask]: Set the default umask of the remote server to newmask, for example, umask 3.
71. user-name [password] [account]: indicates your identity to the remote host. If you need a password, 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 value is on.
73 .? [Cmd]: Same as help.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.