The following table lists and describes the available FTP commands.
FTP Command |
Description |
---|---|
ABOR |
The ABOR command aborts the previous FTP service command and any associated transfer of data. Server replies:
|
APPE |
The APPE command appends data to the end of a file on the remote host. If the file does not already exist, it is created. Server replies:
|
AUTH |
The AUTH command establishes an SSL encrypted session. Only the SSL type is supported. Server replies:
|
CDUP |
The CDUP command changes the parent directory. Server replies:
|
CWD |
The CWD command changes the working directory. If the directory name is not specified, the root directory (/) is assumed. Server replies:
|
DELE |
The DELE command deletes the file specified by the provided path. Server replies:
|
EPRT |
The EPRT command allows for the specification of an extended address for the data connection. The extended address must consist of the network protocol, as well as the network and transport addresses. The format of EPRT is: EPRT |<net-prt>|<net-addr>|<tcp-port>| Server replies:
|
EPSV |
The EPSV command requests that a server listen on a data port and wait for a connection. Server replies:
|
FEAT |
The FEAT command displays the feature list. Server replies:
|
HELP |
The HELP command displays the HELP information. Server replies:
|
LIST |
The LIST command causes a list to be sent from the server. If the path name specifies a directory or other group of files, the server should transfer a list of files in the specified directory. If the path name specifies a file, then the server should send current information on the file. A null argument implies that the user is currently working in that directory or it is a default directory. Server replies:
|
MDTM |
The MDTM command returns the date and time of when a file was modified. Server replies:
|
MFMT |
The MFMT command resets the remote files timestamp. Server replies:
|
MKD |
The MKD command causes the directory specified in the path name to be created as a directory (if the path name is absolute) or as a subdirectory of the current working directory (if the path name is relative). Server replies:
|
NLST |
The NLST command causes a directory listing to be sent from the server to the user site. The path name should specify a directory or other system-specific file group descriptor. A null argument implies the current directory. The server will return a stream of file names and no other information. Server replies:
|
NOOP |
The NOOP command means there is no operation. Server replies:
|
PASS |
The PASS command is a Telnet string argument field specifying the user password. This command must be immediately preceded by the USER command. Server replies:
|
PASV |
The PASV command requests the server to listen on a data port (which is not its default data port) and to wait for a connection rather than initiate one upon receipt of a transfer command. The response to this command includes the host and port address this server is listening on. Server replies:
|
PBSZ |
The PBSZ command represents the protection buffer size. Server replies:
|
PORT |
The PORT command is HOST-PORT specification argument for the data port to be used in data connection. There are defaults for both the user and server data ports, and under normal circumstances this command and its reply are not needed. If this command is used, the argument is the concatenation of a 32-bit internet host address and a 16-bit TCP port address. This address information is broken into 8-bit fields and the value of each field is transmitted as a decimal number (in character string representation). The fields are separated by commas. An example of a port command is: PORT h1,h2,h3,h4,p1,p2 Server replies:
|
PROT |
The PROT command returns a data channel protection level. The supported level values are C and P. P protects the connection, while C clears the connection. Server replies:
|
PWD |
The PWD command displays the name of the current working directory. Server replies:
|
QUIT |
The QUIT command closes the connection. Server replies:
|
REST |
The RESET command is an argument field that represents a server marker at which a file transfer is to be restarted. This command does not cause the file transfer but rather skips over the file to the specified data checkpoint. This command must be immediately followed by the appropriate FTP service command, which resumes the file transfer. Server replies:
|
RETR |
The RETR command causes the server to transfer a copy of the file, specified in the path name, to the server at the other end of the data connection. The status and contents of the file at the server site are unaffected. Server replies:
|
RMD |
The RMD command causes the directory specified in the path name to be removed as a directory (if the path name is absolute) or as a subdirectory of the current working directory (if the path name is relative). Server replies:
|
RNFR |
The RNFR command specifies the old path name of the file which is to be renamed. This command must be immediately followed by a RNTO command specifying the new file path name. Server replies:
|
RNTO |
The RNTO command specifies the new path name of the designated file immediately preceding the RNFR command. Together the two commands cause a file to be renamed. Server replies:
|
SITE |
The SITE command handles server-specific commands. For more information, see The SITE Command. |
SIZE |
The SIZE command returns the size of the file in bytes. Server replies:
|
STOR |
The STOR command causes the server to accept the data transferred through the data connection and to store the data as a file at the server site. If the file specified in the path name exists at the server site, then its contents are replaced by the data being transferred. A new file is created at the server site if the file specified in the path name does not already exist. Server replies:
|
STOU |
The STOU command behaves like the STOR command except that the resultant file is created in the current directory under a name unique to that directory. Server replies:
|
SYST |
The SYST command is used to find out the type of operating system on the server. Server replies:
|
TYPE |
The TYPE command specifies the representation type. The allowed types are A and I. Server replies:
|
USER |
The USER command is a Telnet string argument field identifying the user. The user identification is required by the server to access the file system. Server replies:
|
iWay Software |