List of FTP commands explained

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.

CommandRFCDescription
ABOR RFC 959Abort an active file transfer.
ACCT RFC 959Account information.
ADAT RFC 2228Authentication/Security Data
ALLO RFC 959Allocate sufficient disk space to receive a file.
APPE RFC 959Append (with create)
AUTH RFC 2228Authentication/Security Mechanism
AVBLStreamlined FTP Command ExtensionsGet the available space
CCC RFC 2228Clear Command Channel
CDUP RFC 959Change to Parent Directory.
CONF RFC 2228Confidentiality Protection Command
CSIDStreamlined FTP Command ExtensionsClient / Server Identification
CWD RFC 697Change working directory.
DELE RFC 959Delete file.
DSIZStreamlined FTP Command ExtensionsGet the directory size
ENC RFC 2228Privacy Protected Channel
EPRT RFC 2428Specifies an extended address and port to which the server should connect.
EPSV RFC 2428Enter extended passive mode.
FEAT RFC 2389Get the feature list implemented by the server.
HELP RFC 959Returns usage documentation on a command if specified, else a general help document is returned.
HOSTRFC 7151Identify desired virtual host on server, by name.
LANG RFC 2640Language Negotiation
LIST RFC 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.
MDTM RFC 3659Return the last-modified time of a specified file.
MFCTThe 'MFMT', 'MFCT', and 'MFF' Command Extensions for FTPModify the creation time of a file.
MFFThe 'MFMT', 'MFCT', and 'MFF' Command Extensions for FTPModify fact (the last modification time, creation time, UNIX group/owner/mode of a file).
MFMTThe 'MFMT', 'MFCT', and 'MFF' Command Extensions for FTPModify the last modification time of a file.
MIC RFC 2228Integrity Protected Command
MKD RFC 959Make directory.
MLSD RFC 3659Lists the contents of a directory in a standardized machine-readable format.
MLST RFC 3659Provides data about exactly the object named on its command line in a standardized machine-readable format.
MODE RFC 959Sets the transfer mode (Stream, Block, or Compressed).
NLST RFC 959Returns a list of file names in a specified directory.
NOOP RFC 959No operation (dummy packet; used mostly on keepalives).
OPTS RFC 2389Select options for a feature (for example [https://datatracker.ietf.org/doc/draft-ietf-ftpext-utf-8-option/ OPTS UTF8 ON]).
PASS RFC 959Authentication password.
PASV RFC 959Enter passive mode.
PBSZ RFC 2228Protection Buffer Size
PORT RFC 959Specifies an address and port to which the server should connect.
PROT RFC 2228Data Channel Protection Level.
PWD RFC 959Print working directory. Returns the current directory of the host.
QUIT RFC 959Disconnect.
REIN RFC 959Re initializes the connection.
REST RFC 3659Restart transfer from the specified point.
RETR RFC 959Retrieve a copy of the file
RMD RFC 959Remove a directory.
RMDAStreamlined FTP Command ExtensionsRemove a directory tree
RNFR RFC 959Rename from.
RNTO RFC 959Rename to.
SITE RFC 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.
SIZE RFC 3659Return the size of a file.
SMNT RFC 959Mount file structure.
SPSVFTP Extension Allowing IP Forwarding (NATs)Use single port passive mode (only one TCP port number for both control connections and passive-mode data connections)
STAT RFC 959Returns information on the server status, including the status of the current connection
STOR RFC 959Accept the data and to store the data as a file at the server site
STOU RFC 959Store file uniquely.
STRU RFC 959Set file transfer structure.
SYST RFC 959Return system type.
THMBStreamlined FTP Command ExtensionsGet a thumbnail of a remote image file
TYPE RFC 959Sets the transfer mode (ASCII/Binary).
USER RFC 959Authentication username.
XCUP&1000775 RFC 775Change to the parent of the current working directory
XMKD&1000775 RFC 775Make a directory
XPWD&1000775 RFC 775Print the current working directory
XRCP&1000743 RFC 743RFC 959
XRMD&1000775 RFC 775Remove the directory
XRSQ&1000743 RFC 743RFC 959
XSEM&1000737 RFC 737Send, mail if cannot
XSEN&1000737 RFC 737Send to terminal

See also

External links