
Chapter 12 – FTP Client
Command Line Interface and Application Examples for Multi-Tech Systems, Inc. IP Modules (S000368F) 121
Scenario 1 – Listing Directory Contents
This scenario describes how to list the contents of the specified directory of the FTP server:
• Without Automatic Authentication (default).
• The data connection in ACTIVE mode.
• When the user does not specify the directory name in the command line with the –d option, and an entry for
the default directory name does not exist in the configuration, the user is prompted for the directory name.
(Setting the default configuration is explained in the previous section).
Description
The IP module establishes the control connection to the specified FTP server and prompts
the host device to enter the login name, password:
Name (ip-address:admin): mtss <CR>
Password: **** <CR>
If successfully logged in, IP module sends a message and prompts the host device to enter
the remote directory, the contents of which will then be displayed.
Connected
Remote directory: <CR> or <Directory-Path>
If the Host simply enters <CR> without specifying the directory, then the contents of the
present working directory are listed. If the complete path of the directory is given, then the
contents of that directory are listed.
If –m option is specified, it prompts the user for the next transaction or to quit. If the user
selects to do another transaction, then he is prompted to enter the directory again. In this
case, the directory entered for the previous transaction will not be considered.
By default the data connection is in active mode. The client sets the data transfer mode as
‘ASCII’ to receive the list of contents of the directory.
Configuration
None
Command
ftp -l [-d <directory>] [–p] [-m]<ip-address/host-name>
Result Response
OK: FTP session closed
Scenario 2 – Listing Directory Contents
This scenario describes how to list the contents of the specified directory of the FTP server:
• Without Automatic Authentication (default).
• The data connection in PASSIVE mode.
• When the user does not specify the directory name in the command line with the –d option, and an entry for
the default directory name does not exist in the configuration, the user is prompted for the directory name.
(Setting the default configuration is explained in the later section).
Description
The IP module establishes the control connection to the specified FTP server and prompts
the host device to enter the login name, password:
Name (ip-address:admin): mtss <CR>
Password: **** <CR>
If successfully logged in, IP module sends a message and prompts the host device to enter
the remote directory, the contents of which will then be displayed.
Connected
Remote directory: <CR> or <Directory-Path>
If the Host simply enters <CR> without specifying the directory, then the contents of the
present working directory are listed. If the complete path of the directory is given, then the
contents of that directory are listed.
If –m option is specified, it prompts the user for the next transaction or to quit. If the user
selects to do another transaction, then he is prompted to enter the directory again. In this
case, the directory entered for the previous transaction will not be considered.
The data connection is in passive mode due to the '-p' option. The client sets the data
transfer mode as ‘ASCII’ to receive the list of contents of the directory.
Configuration
None
Command
ftp -l [-d <directory> [-p] [-m]<ip-address>
Result Response
OK: FTP session closed
Comentarios a estos manuales