You are on the nsftools.com site
This page originally appeared
Http://www.dreamhaven.org/ftp-raw.html, but the last time I looked it wasn' t there any more, so I posted a local copy for you here. if you were really looking for a list of commands for the Microsoft Windows command-line FTP client, please
Look here instead.
List of raw FTP commands
(Warning: this is a technical document, not necessary for most ftpuse .)
Note that commands marked with a * are not implemented in a Number offtp servers.
Common commands
- Abor-AborT a File Transfer
- CWD-CHange
WOrkingDIrectory
- Dele-DeleTe A Remote File
- List-ListRemote files
- MDTM-return
MODIficationTIME of a file
- MKD-MAKE a remote
DIrectory
- NLST-NAME
LIStOf remote directory
- Pass-send
PassWord
- PASV-enter
PASSiVE mode
- Port-open a data
Port
- PWD-PRINT
WOrkingDIrectory
- Quit-terminate the connection
- Retr-RETRIeve a Remote File
- RMD-REMOve a remote
DIrectory
- RNFR-RENAME
FROm
- RNTO-RENAME
To
- Site-Site-Specific commands
- Size-return
SizeOf a file
- Stor-StorE a file on the remote host
- Type-set transfer
Type
- User-send
UserName
Less common commands
- Acct *-send
ACCOunTInformation
- Appe-AppeNd to a remote file
- Cdup-CWD to the parent of the current directory
- Help-return
HelpOn using the server
- Mode-set transfer
Mode
- Noop-do nothing
- Rein *-ReinItialize the connection
- Stat-return server
StatUs
- STOU-StoRe a file
UNiquely
- Stru-set File Transfer
StruCture
- Syst-return
SystEm type
Abor
Syntax: Abor
Aborts a file transfer currently in progress.
Acct *
Syntax: AcctAccount-Info
This command is used to send account information on systems that requireit. Typically sent after
PASS command.
Allo
Syntax: AlloSize[RMax-record-size]
Allocates sufficient storage space to receive a file. if the maximumsize of a record also needs to be known, that is sent as a secondnumeric parameter following a space, the capital letter "R", and anotherspace.
Appe
Syntax: AppeRemote-filename
Append data to the end of a file on the remote host. If the file doesnot already exist, it is created. This command must be preceded by aport or
PASV command so that theserver knows where to receive data from.
Cdup
Syntax: Cdup
Makes the parent of the current directory be the current directory.
CWD
Syntax: CWDRemote-directory
Makes the given directory be the current directory on the remote host.
Dele
Syntax: DeleRemote-filename
Deletes the given file on the remote host.
Help
Syntax: Help [Command]
IfCommandIs given, returns help on that command; otherwise, returns general help for the FTP server (usually a list of supportedcommands ).
List
Syntax: List [Remote-filespec]
IfRemote-filespecRefers to a file, sends information about thatfile. If
Remote-filespecRefers to a directory, sends informationabout each file in that directory.
Remote-filespecDefaults to thecurrent directory. This command must be preceded by aport or
PASV command.
MDTM
Syntax: MDTMRemote-filename
Returns the last-modified time of the given file on the remote host inthe format"Yyyymmddhhmmss":
YyyyIs thefour-digit year,MmIs the month from 01 to 12,DdIs the day of the month from 01 to 31,
HHIsthe hour from 00 to 23,MmIs the minute from 00 to 59, andSSIs the second from 00 to 59.
MKD
Syntax: MKDRemote-directory
Creates the named directory on the remote host.
Mode
Syntax: ModeMode-Character
Sets the transfer mode to one:
- S-stream
- B-block
- C-compressed
The default mode is stream.
NLST
Syntax: NLST [Remote-directory]
Returns a list of filenames in the given directory (defaulting to thecurrent directory), with no other information. must be preceded by aport or
PASV command.
Noop
Syntax: Noop
Does nothing response t return a response.
Pass
Syntax: PassPassword
After sending the USER command, send this command ToComplete the login process. (note, however, that
Acctcommand may have to be used on some systems .)
PASV
Syntax: PASV
Tells the server to enter "passive mode ". in passive mode, the server willwait for the client to establish a connection with it rather thanattempting to connect to a client-specified port. the server will respondwith the address of the port it is listening
On, with a message like:
227 entering passive mode (A1,A2,A3,A4,P1,P2)
WhereA1.A2.A3.A4Is the IP address andP1* 256 +P2Is the port number.
Port
Syntax: PortA1,A2,A3,A4,P1,P2
Specifies the host and port to which the server shoshould connect for the nextfile transfer. This is interpreted as IP AddressA1.A2.A3.A4, Port
P1* 256 +P2.
PWD
Syntax: PWD
Returns the name of the current directory on the remote host.
Quit
Syntax: Quit
Terminates the command connection.
Rein *
Syntax: Rein
Reinitializes the command connection-cancels the currentuser/password/account information. shocould be followed by auser command for another login.
Rest
Syntax: RestPosition
Sets the point at which a file transfer shoshould start; useful for resuminginterrupted transfers. For nonstructured files, this is simply a decimalnumber. This command must immediately precede a data transfer command (RETR
Or stor only); I. e. It mustcome after any
Port or
PASV command.
RETR
Syntax: RETRRemote-filename
Begins transmission of a file from the remote host. Must be preceded byeither
PORT command or
Pasvcommand to indicate where the server shocould send data.
RMD
Syntax: RMDRemote-directory
Deletes the named directory on the remote host.
RNFR
Syntax: RNFRFrom-filename
Used when renaming a file. Use this command to specify the file to berenamed; follow it with
RNTO command to specify thenew name for the file.
RNTO
Syntax: RNTOTo-filename
Used when renaming a file. after sending
Rnfrcommand to specify the file to rename, send this command to specify thenew name for the file.
Site *
Syntax: SiteSite-specific-command
Executes a site-specific command.
Size
Syntax: SizeRemote-filename
Returns the size of the remote file as a decimal number.
Stat
Syntax: Stat [Remote-filespec]
If invoked without parameters, returns general status information aboutthe FTP server process. If a parameter is given, acts like theList command, wait t that data is sent over thecontrol connection
(No port or
Pasvcommand is required ).
Stor
Syntax: StorRemote-filename
Begins transmission of a file to the remote site. Must be preceded byeither
PORT command or a pasvcommand so the server knows where to accept data from.
STOU
Syntax: STOU
Begins transmission of a file to the remote site; the remote filenamewill be unique in the current directory. The response from the serverwill include the filename.
Stru
Syntax: StruStructure-Character
Sets the file structure for transfer to one:
- F-file (No structure)
- R-record Structure
- P-Page Structure
The default structure is file.
Syst
Syntax: Syst
Returns a word identifying the system, the word "type:", and the defaulttransfer type (as wocould be set by
Type COMMAND). For example:
UNIX type: l8
Type
Syntax: TypeType-Character[Second-type-Character]
Sets the type of file to be transferred.Type-CharacterCan be anyof:
- A-ASCII text
- E-ebcdic text
- I-image (binary data)
- L-local format
For A and E,Second-type-CharacterSpecifies how the textshocould be interpreted. It can be:
- N-non-print (not destined for printing). This is the default ifSecond-type-CharacterIs omitted.
- T-Telnet format Control (<CR>,<FF>, Etc .)
- C-ASA carriage Control
For l,Second-type-CharacterSpecifies the number of BITs perbyte on the local system, and may not be omitted.
User
Syntax: UserUsername
Send this command to begin the login process.UsernameShoshould be avalid username on the system, or "anonymous" to initiate an anonymouslogin.