An explanation of FTP commands

Source: Internet
Author: User
Tags chmod file size ftp ftp commands hash parent directory remote ftp server runique

The command line format for FTP is: ftp-v-d-i-N-G [hostname], where

-V does not display all the response information for the remote server;

-N Limit FTP automatic login, that is, do not use;. N etrc File

-D using debug mode

-G cancels the global file name.
The internal commands used by FTP are as follows (the brackets indicate the optional options):
1.! [Cmd[args]]: Executing an interactive shell in the local machine
2.$ Macro-ame[args]: Executes the macro definition Macro-name.
3.account[password]: Provides the supplemental password required to access system resources after a successful logon to the remote system. 4.append Local-file[remote-file]: Appends the local file to the remote system host and uses the local file name if the remote system file name is not specified.
5.ASCII: Use ASCII type transfer mode.
6.bell: The computer rings once after each command is executed.
7.bin: Use a binary file transfer method.
8.bye: Exits the FTP session process.
9.case: When using Mget, capitalize the remote host file name into lowercase letters.
10.CD Remote-dir: Enter the remote host directory.
11.cd.. : Enter the parent directory of the remote host directory.
12.chmod mode file-name: Sets the remote host file File-name access mode to mode, such as: chmod 777 a.out.
13.close: Interrupts the FTP session with the remote server (corresponding to open).
14.CR: When you transfer a file using Asscii, the carriage return line is converted to a return line.
15.delete remote-file: Delete the remote host file.
16.debug[debug-value]: Set debug mode, display each command sent to the remote host, such as: Debug 3, if set to 0, means cancel Debug.
17.dir[remote-dir][local-file]: Displays the remote host directory and stores the results in local file local-file.
19.form format: Sets the file transfer mode to format, which is the default.
20.get Remote-file[local-file]: Transfer the remote host's file Remote-file to the local-file of the local hard drive.
21.glob: Set mdelete,mget,mput file name extension, by default, does not extend the file name, the same as the command line-G parameter.
22.hash: 1024 bytes per transmission, showing a hash symbol (#).
23.help[cmd]: Displays help information for the FTP internal command cmd, such as: get.
24.idle[seconds]: Set the remote server's sleep timer to [seconds] seconds.
25.image: Set binary transfer mode (same 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 Local-file. 28.macdef Macro-name: Defines a macro that, when encountered with empty lines under Macdef, ends the macro definition.
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.
31.mget remote-files: Transfer multiple remote files.
32.mkdir dir-name: Build 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, the default is stream mode.
36.mput local-file: Transfers multiple files to a remote host.
37.newer File-name: If the file-name in the remote machine is modified more closely than the local hard disk file with the same name, the file is re-transmitted.
38.nlist[remote-dir][local-file]: Displays the list of files for the remote host directory and deposits the local-file of the local hard disk.
39.nmap[inpattern Outpattern]: Sets the file name Mapping mechanism, so that when files are transferred, some characters in the file are converted to each other, such as: Nmap $1.$2.$3[$1,$2]. [$2,$3], when the file a1.a2.a3 is transferred, the filename becomes a1,a2. This command is especially useful for cases where the remote host is not a UNIX machine.
40.ntrans[inchars[outchars]]: Sets the translation mechanism of the filename character, such as Ntrans 1R, then the file name LLL becomes the RRR.
41.open Host[port]: establishes the specified FTP server connection and can specify the connection port.
42.passive: Enter passive transmission mode.
43.prompt: Interactive tips for setting up multiple file transfers.
44.proxy Ftp-cmd: In the secondary control connection, execute an FTP command that allows you to connect two FTP servers to transfer files between two servers. The first FTP command must be open to establish a connection between two servers first.
45.put Local-file[remote-file]: Transfers The local file Local-file to the remote host.
46.pwd: Displays the current working directory of the remote host.
47.quit: With bye, exit the FTP session.
48.quote arg1,arg2 ... : The parameters are sent verbatim to the 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 is resumed from the last transmission interrupt.
51.rhelp[cmd-name]: Request help for remote host.
52.rstatus[file-name]: If the file name is not specified, the status of the remote host is displayed, otherwise the file status is displayed.
53.rename[from][to]: Change the remote host file name.
54.reset: Clears the answer queue.
55.restart marker: Start the Get or put again from the specified flag marker, such as: Restart 130
56.rmdir dir-name: Deletes the remote host directory.
57.runique: Set file name Uniqueness Store, if the file exists, then add suffix after the original file. 1,.2 and so on.
58.send Local-file[remote-file]: same put.
59.sendport: Set the use of the port command.
60.site arg1,arg2 ... : sends the parameter verbatim to the remote FTP host as the site command.
61.size file-name: Displays the remote host file size, such as: Site Idle 7200.
62.status: Displays the current FTP status.
63.struct[struct-name]: Sets the file transfer structure to struct-name, using the stream structure by default.
64.sunique: Set the remote host file name store 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 desired type of the Tenex machine.
67.tick: Sets the byte counter at transfer time.
68.trace: Set up Package tracking.
69.type[type-name]: Set the file Transfer type to Type-name, default to ASCII, such as: Type binary, set the binary transfer mode.
70.umask[newmask]: Set the remote server's default umask to Newmask, such as: Umask 3
71.user User-name[password][account]: To identify yourself to the remote host, you must enter a password when you need a password, such as: User anonymous my@email.
72.verbose: With the command line of the-v parameter, that is, set the detailed reporting method, the FTP server all the response will be displayed to the user, the default is on.
73.? [cmd]: With 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.