List of FTP commands


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.
CommandRFCDescription
ABORAbort an active file transfer.
ACCTAccount information.
ADATRFC 2228Authentication/Security Data
ALLOAllocate sufficient disk space to receive a file.
APPEAppend
AUTHRFC 2228Authentication/Security Mechanism
AVBLGet the available space
CCCRFC 2228Clear Command Channel
CDUPChange to Parent Directory.
CONFRFC 2228Confidentiality Protection Command
CSIDClient / Server Identification
CWDRFC 697Change working directory.
DELEDelete file.
DSIZGet 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.
HELPReturns 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
LISTReturns 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.
MFCTModify the creation time of a file.
MFFModify fact.
MFMTModify the last modification time of a file.
MICRFC 2228Integrity Protected Command
MKDMake directory.
MLSDRFC 3659Lists the contents of a directory if a directory is named.
MLSTRFC 3659Provides data about exactly the object named on its command line, and no others.
MODESets the transfer mode.
NLSTReturns a list of file names in a specified directory.
NOOPNo operation.
OPTSRFC 2389Select options for a feature.
PASSAuthentication password.
PASVEnter passive mode.
PBSZRFC 2228Protection Buffer Size
PORTSpecifies an address and port to which the server should connect.
PROTRFC 2228Data Channel Protection Level.
PWDPrint working directory. Returns the current directory of the host.
QUITDisconnect.
REINRe initializes the connection.
RESTRFC 3659Restart transfer from the specified point.
RETRRetrieve a copy of the file
RMDRemove a directory.
RMDARemove a directory tree
RNFRRename from.
RNTORename to.
SITESends site specific commands to remote server. Inspect SITE HELP output for complete list of supported commands.
SIZERFC 3659Return the size of a file.
SMNTMount file structure.
SPSVUse single port passive mode
STATReturns information on the server status, including the status of the current connection
STORAccept the data and to store the data as a file at the server site
STOUStore file uniquely.
STRUSet file transfer structure.
SYSTReturn system type.
THMBGet a thumbnail of a remote image file
TYPESets the transfer mode.
USERAuthentication 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 743
XRMD&1000775 RFC 775Remove the directory
XRSQ&1000743 RFC 743
XSEM&1000737 RFC 737Send, mail if cannot
XSEN&1000737 RFC 737Send to terminal