List of FTP commands

Last updated

Below is a list of FTP commands that may be sent to a File Transfer Protocol (FTP) server. It includes all commands that are standardized by the Internet Engineering Task Force (IETF) in RFC 959, plus extensions. Note that most command-line FTP clients present their own non-standard set of commands to users. For example, GET is the common user command to download a file instead of the raw command RETR.

Command RFC Description
ABORRFC 959Abort an active file transfer.
ACCTRFC 959Account information.
ADATRFC 2228Authentication/Security Data
ALLORFC 959Allocate sufficient disk space to receive a file.
APPERFC 959Append (with create)
AUTHRFC 2228Authentication/Security Mechanism
AVBL Streamlined FTP Command Extensions Get the available space
CCCRFC 2228Clear Command Channel
CDUPRFC 959Change to Parent Directory.
CONFRFC 2228Confidentiality Protection Command
CSID Streamlined FTP Command Extensions Client / Server Identification
CWDRFC 697Change working directory.
DELERFC 959Delete file.
DSIZ Streamlined FTP Command Extensions Get the directory size
ENCRFC 2228Privacy Protected Channel
EPRTRFC 2428Specifies an extended address and port to which the server should connect.
EPSVRFC 2428Enter extended passive mode.
FEATRFC 2389Get the feature list implemented by the server.
HELPRFC 959Returns usage documentation on a command if specified, else a general help document is returned.
HOSTRFC 7151Identify desired virtual host on server, by name.
LANGRFC 2640Language Negotiation
LISTRFC 959Returns information of a file or directory if specified, else information of the current working directory is returned.
LPRTRFC 1639Specifies a long address and port to which the server should connect.
LPSVRFC 1639Enter long passive mode.
MDTMRFC 3659Return the last-modified time of a specified file.
MFCT The 'MFMT', 'MFCT', and 'MFF' Command Extensions for FTP Modify the creation time of a file.
MFF The 'MFMT', 'MFCT', and 'MFF' Command Extensions for FTP Modify fact (the last modification time, creation time, UNIX group/owner/mode of a file).
MFMT The 'MFMT', 'MFCT', and 'MFF' Command Extensions for FTP Modify the last modification time of a file.
MICRFC 2228Integrity Protected Command
MKDRFC 959Make directory.
MLSDRFC 3659Lists the contents of a directory in a standardized machine-readable format.
MLSTRFC 3659Provides data about exactly the object named on its command line in a standardized machine-readable format.
MODERFC 959Sets the transfer mode (Stream, Block, or Compressed).
NLSTRFC 959Returns a list of file names in a specified directory.
NOOPRFC 959No operation (dummy packet; used mostly on keepalives).
OPTS RFC 2389 Select options for a feature (for example OPTS UTF8 ON ).
PASSRFC 959Authentication password.
PASVRFC 959Enter passive mode.
PBSZRFC 2228Protection Buffer Size
PORTRFC 959Specifies an address and port to which the server should connect.
PROTRFC 2228Data Channel Protection Level.
PWDRFC 959Print working directory. Returns the current directory of the host.
QUITRFC 959Disconnect.
REINRFC 959Re initializes the connection.
RESTRFC 3659Restart transfer from the specified point.
RETRRFC 959Retrieve a copy of the file
RMDRFC 959Remove a directory.
RMDA Streamlined FTP Command Extensions Remove a directory tree
RNFRRFC 959Rename from.
RNTORFC 959Rename to.
SITERFC 959Sends site specific commands to remote server (like SITE IDLE 60 or SITE UMASK 002). Inspect SITE HELP output for complete list of supported commands.
SIZERFC 3659Return the size of a file.
SMNTRFC 959Mount file structure.
SPSV FTP Extension Allowing IP Forwarding (NATs) Use single port passive mode (only one TCP port number for both control connections and passive-mode data connections)
STATRFC 959Returns information on the server status, including the status of the current connection
STORRFC 959Accept the data and to store the data as a file at the server site
STOURFC 959Store file uniquely.
STRURFC 959Set file transfer structure.
SYSTRFC 959Return system type.
THMB Streamlined FTP Command Extensions Get a thumbnail of a remote image file
TYPERFC 959Sets the transfer mode (ASCII/Binary).
USERRFC 959Authentication username.
XCUP RFC 775Change to the parent of the current working directory
XMKD RFC 775Make a directory
XPWD RFC 775Print the current working directory
XRCP RFC 743RFC 959
XRMD RFC 775Remove the directory
XRSQ RFC 743RFC 959
XSEM RFC 737Send, mail if cannot
XSEN RFC 737Send to terminal

See also