next up previous
Next: Connecting to a server Up: Simple FTP Client Sessions Previous: Commands may be abbreviated

Seeing the FTP Protocol commands used

  To see the FTP Protocol commands used and messages returned by the server invoke the debug command in the FTP client. You will then the additional (Protocol and messages) in the display.

The verbose command can be used to see the servers response only. Verbose mode should always be letf turned on.

debug
-- Toggle debugging mode. When debugging is on, ftp prints each Protocol command sent to the remote machine, preceded by the string --->.

verbose
-- Toggle verbose mode. In verbose mode, all responses from the FTP server are displayed to the user. In addition, if verbose mode is on, when a file transfer completes, statistics regarding the efficiency of the transfer are reported. By default, verbose mode is on if ftp's commands are coming from a terminal, and off otherwise.

In the example below we turn the debugging ON then send a command ascii (see Section 4.6.4 below for this command) and turn debigging off. verbose mode is very similar.

ftp> debug
Debugging on (debug=1).
ftp> ascii
---> TYPE A
200 Type set to A.
ftp> debug
Debugging off (debug=0).
ftp>

Note that the ascii command translates to the ---> TYPE A Protocol (see Section 4.6.5 command and a successfull 200 reply is returned by the server.

In verbose mode you do not see the Protocol command set but you see the servers response:

ftp> verbose
Verbose mode on.
ftp> ascii
200 Type set to A.
ftp> verbose
Verbose mode off.
ftp> ascii
ftp>

If you feel brave enough you can use ftp to converse in the actual FTP Protocol with the quote command:

quote
arg1 arg2 ... -- Send the arguments specified, verbatim, to the remote FTP server. A single FTP reply code is expected in return. (The remotehelp command displays a list of valid arguments.)

quote should be used only by experienced users who are familiar with the FTP protocol. As simple example use is:

ftp> quote  TYPE A   
200 Type set to A.
ftp>


next up previous
Next: Connecting to a server Up: Simple FTP Client Sessions Previous: Commands may be abbreviated
Dave Marshall
9/28/2001