Jump to content

List of FTP commands

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by DavidL (talk | contribs) at 13:33, 12 August 2018 (Add external link for 'CSID', 'AVBL', 'DSIZ', 'RMDA', and 'THMB' commands). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Below is a list of FTP commands that may be sent to an FTP server, including all commands that are standardized in RFC 959 by the IETF. All commands below are RFC 959 based unless stated otherwise. Note that most command-line FTP clients present their own 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
ABOR Abort an active file transfer.
ACCT Account information.
ADAT RFC 2228 Authentication/Security Data
ALLO Allocate sufficient disk space to receive a file.
APPE Append (with create)
AUTH RFC 2228 Authentication/Security Mechanism
AVBL Streamlined FTP Command Extensions Get the available space
CCC RFC 2228 Clear Command Channel
CDUP Change to Parent Directory.
CONF RFC 2228 Confidentiality Protection Command
CSID Streamlined FTP Command Extensions Client / Server Identification
CWD RFC 697 Change working directory.
DELE Delete file.
DSIZ Streamlined FTP Command Extensions Get the directory size
ENC RFC 2228 Privacy Protected Channel
EPRT RFC 2428 Specifies an extended address and port to which the server should connect.
EPSV RFC 2428 Enter extended passive mode.
FEAT RFC 2389 Get the feature list implemented by the server.
HELP Returns usage documentation on a command if specified, else a general help document is returned.
HOST RFC 7151 Identify desired virtual host on server, by name.
LANG RFC 2640 Language Negotiation
LIST Returns information of a file or directory if specified, else information of the current working directory is returned.
LPRT RFC 1639 Specifies a long address and port to which the server should connect.
LPSV RFC 1639 Enter long passive mode.
MDTM RFC 3659 Return 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.
MIC RFC 2228 Integrity Protected Command
MKD Make directory.
MLSD RFC 3659 Lists the contents of a directory if a directory is named.
MLST RFC 3659 Provides data about exactly the object named on its command line, and no others.
MODE Sets the transfer mode (Stream, Block, or Compressed).
NLST Returns a list of file names in a specified directory.
NOOP No operation (dummy packet; used mostly on keepalives).
OPTS RFC 2389 Select options for a feature (for example OPTS UTF8 ON).
PASS Authentication password.
PASV Enter passive mode.
PBSZ RFC 2228 Protection Buffer Size
PORT Specifies an address and port to which the server should connect.
PROT RFC 2228 Data Channel Protection Level.
PWD Print working directory. Returns the current directory of the host.
QUIT Disconnect.
REIN Re initializes the connection.
REST RFC 3659 Restart transfer from the specified point.
RETR Retrieve a copy of the file
RMD Remove a directory.
RMDA Streamlined FTP Command Extensions Remove a directory tree
RNFR Rename from.
RNTO Rename to.
SITE Sends 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 3659 Return the size of a file.
SMNT Mount 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)
STAT Returns the current status.
STOR Accept the data and to store the data as a file at the server site
STOU Store file uniquely.
STRU Set file transfer structure.
SYST Return system type.
THMB Streamlined FTP Command Extensions Get a thumbnail of a remote image file
TYPE Sets the transfer mode (ASCII/Binary).
USER Authentication username.
XCUP &1000775 RFC 775 Change to the parent of the current working directory
XMKD &1000775 RFC 775 Make a directory
XPWD &1000775 RFC 775 Print the current working directory
XRCP &1000743 RFC 743
XRMD &1000775 RFC 775 Remove the directory
XRSQ &1000743 RFC 743
XSEM &1000737 RFC 737 Send, mail if cannot
XSEN &1000737 RFC 737 Send to terminal

See also