FTP Commands: FEAT, OPTS, HELP, STAT, NLST, XCUP, XCWD
FEAT FTP command
The FEAT command provides FTP clients with a mechanism of quickly determining what extended features the FTP server supports. If this command is supported, the server will reply with a multi-line response where each line of the response contains an extended feature command supported by the server.
In the past, an FTP client would issue an extended command to the server and use the server’s response code to determine whether or not it was supported. This is commonly seen when an FTP client issues a “REST 0” (restart) command after logging in to a server. The FEAT command eliminates the need for this type of trial-and-error discovery.
Common responses:
OPTS FTP command
The OPTS command is a required command if the FEAT command is also implemented. This command is used to provide additional information for extended features supported by the FTP server. This command will be followed by the name of the command requiring additional information. Following the command being configured will be additional parameters that have meaning only in the context of the command being configured. FTP Voyager currently issues the OPTS command under two circumstances:
- MODE – FTP Voyager will issue an OPTS MODE command to servers to configure extended options for a given transfer mode. Most commonly MODE is implemented in the “MODE Z LEVEL X” command for supporting on-the-fly compression to configure the level of compression to use for the session where ‘X’ is a number between 1 (fastest, least compression) and 10 (slowest, most compression). FTP Voyager uses a default value of 6.
- MLST – FTP Voyager may issue an OPTS MLST command to servers supporting the MLST command in order to configure the amount of information sent by the server in response to the MLST command. It is issued in the format OPTS MLST Info1;Info2;Info3 etc, with each type of information separated by a semicolon. Information types can include Type (filetype), Size (filesize), Modify (last modification date), Create (date of file creation), and more. The information types the server supports are sent to the client as part of the server’s response to the FEAT command, and used to determine the contents of the OPTS MLST command issued to the server.
- UTF8 – Configures the server to enable (ON) or disable (OFF) UTF-8 encoding which is useful for non-ANSI character sets. This is very useful for Asian file names and paths.
Common responses:
HELP FTP command
The HELP command can be issued by the client to retrieve information about the FTP server’s implementation of the protocol. Most FTP servers will return a listing of supported (or recognized) commands as a response to the HELP command. Because no format for the response is defined, the response to the HELP command is usually only useful to the user and not necessarily the FTP client software. This command can also be followed by a parameter that is another FTP command. In this case, the server may choose to respond with additional information about its specific implementation of the specified command.
Common responses:
STAT FTP command
If the STAT command is issued during a file transfer, information about the current file transfer is sent to the client. If a path name is provided with the command, it is analogous to the LIST command except for the file information for the specified pathname is sent over the command connection instead of a data connection. A partial pathname can be provided instead, in which case the server will respond with a list of file names or attributes associated with that specification. If no parameter is provided and a file transfer is not in progress, the server will respond with general status information about the FTP server and the current connection.
Common responses:
NLST FTP command
The NLST command is used to retrieve a list of files from the server over a previously established data connection. Unlike the LIST command, the server will send only the list of files and no other information on those files. If a parameter is specified, the server returns the list of files contained in the provided path. If no parameter is present, the server uses the client’s current working directory.
Common responses:
XCUP FTP command
XCWD FTP command
Serv-U Managed File Transfer Server
Let’s talk it over.
Contact our team. Anytime.