Syntax
display ftp-server
View
Any view
Parameter
None
Description
Use the display ftp-server command
to display the FTP server-related settings of a switch when it operates as an
FTP server.
You can use this command to verify FTP
server-related configurations.
Example
# Display the FTP server-related settings
of the switch (assuming that the switch is operating as an FTP server).
<H3C>
display ftp-server
FTP server is running
Max user number 1
User count 0
Timeout value(in minute) 30
Table 1-1 Description on the fields of the display ftp-server command
|
Field
|
Description
|
|
FTP server is running
|
The FTP server is started
|
|
Max user number 1
|
The FTP server can accommodate up to one
user.
|
|
User count 0
|
The current login user number is 0.
|
|
Timeout value (in minute) 30
|
The connection idle time is 30 minutes.
|
Syntax
display ftp-server source-ip
View
Any view
Parameter
None
Description
Use the display ftp-server source-ip command
to display the source IP address set for an FTP server. If a source interface
is specified for the FTP server, the IP address of the source interface will be
displayed. If neither source interface nor source IP address is specified,
0.0.0.0 will be displayed.
Example
# Display the source IP address set for the
FTP server.
<H3C> display ftp-server
source-ip
The source IP you specified is
192.168.0.1
Syntax
display ftp-user
View
Any view
Parameter
None
Description
Use the display ftp-user command
to display the settings of the current FTP user, including the user name, host
IP address, port number, connection idle time, and authorized directory.
Example
# Display FTP user settings.
<H3C> display ftp-user
Username Host IP Port Idle Homedir
H3C 10.110.3.5 1074 2 flash:
# If the user name exceeds ten characters,
characters behind the tenth will be displayed in the second line with a
left-aligning mode. Take username username@test for example, the result is:
<H3C> display ftp-user
Username Host IP Port Idle Homedir
username@t 10.110.3.5 1074 2 flash:
est
Syntax
ftp disconnect user-name
View
System view
Parameter
user-name: Name
of the user to be disconnected from the FTP server.
Description
Use the ftp disconnect command to terminate
the connection between a specified user and the FTP server.
If you attempt to
disconnect a user that is uploading/downloading data to/from the FTP server
that is acted by an S3600 Ethernet switch, the S3600 Ethernet switch will
disconnect the user after the data transmission is completed.
Example
# Display the
current online FTP users.
<H3C> display ftp-user
UserName HostIP
Port Idle HomeDir
test 192.168.0.3
1229 0 flash:
# Disconnect the user named “test”
from the FTP server.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] ftp disconnect test
% The user connection will be
disconnected after the data transfer finished
Syntax
ftp sever enable
undo ftp sever
View
System view
Parameter
None
Description
Use the ftp server enable command to
enable the FTP server for users to log in.
Use the undo ftp server command to
disable the FTP server.
By default, the FTP server is disabled to avoid
potential security risks.
To protect unused
sockets from being attacked by malicious users, the S3600 Ethernet switch
provides the following functions:
l
TCP 21 is enabled only when you start the FTP
server.
l
TCP 21 is disabled after you shut down the FTP
server.
Example
# Enable the FTP server.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] ftp server enable
% Start FTP server
Syntax
ftp timeout minutes
undo ftp timeout
View
System view
Parameter
minutes: Connection
idle time (in minutes) ranging from 1 to 35,791. The default connection idle
time is 30 minutes.
Description
Use the ftp timeout command to set
the connection idle time.
Use the undo ftp timeout command to
restore the default connection idle time.
If a FTP connection between an FTP server
and an FTP client breaks down abnormally, the FTP server is not acknowledged
with this and will keep this connection as usual.
You can set a connection idle time, so that
the FTP server considers a FTP connection to be invalid and terminate it if no
data exchange occurs on it in a specific period known as connection idle time.
Example
# Set the connection idle time to 36
minutes.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] ftp timeout 36
Syntax
ftp-server source-interface interface-type interface-number
undo ftp-server source-interface
View
System view
Parameter
interface-type: Type of the source interface.
interface-number: Number of the source interface.
Description
Use the ftp-server source-interface command
to specify the source interface for an FTP server. If the specified interface does
not exist, a prompt appears to show the configuration fails.
Use the undo ftp-server source-interface
command to cancel the source interface setting. After you execute this
command, the FTP server system decides which interface will be used for being
accessed by FTP clients.
Example
# Specify Vlan-interface2 as the source interface
of the FTP server.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] ftp-server source-interface
Vlan-interface 2
Syntax
ftp-server source-ip ip-address
undo ftp-server source-ip
View
System view
Parameter
ip-address:
IP address that is to be specified as the source IP address.
Description
Use the ftp-server source-ip command
to specify the source IP address for an FTP server. The value of argument ip-address
must be an IP address on the device where the configuration is performed. Otherwise,
a prompt appears to show the configuration fails.
Use the undo ftp-server source-ip
command to cancel the source IP address setting. After you execute this
command, the FTP server system decides which IP address on it will be used for being
accessed by FTP clients.
Example
# Specify 192.168.1.1 as the source IP
address of the FTP server.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] ftp-server source-ip
192.168.1.1
Syntax
ascii
View
FTP client view
Parameter
None
Description
Use the ascii command to specify
that files be transferred in ASCII mode. That is, data is transferred in ASCII characters.
By default, files are transferred in ASCII
mode.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Specify to transfer text files in ASCII
mode.
[ftp] ascii
200 Type set to A.
Syntax
binary
View
FTP Client view
Parameter
None
Description
Use the binary command to specify
that program files be transferred in binary mode.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Specify to transfer files in binary mode.
[ftp] binary
200 Type set to I.
Syntax
bye
View
FTP client view
Parameter
None
Description
Use the bye command to terminate the
control connection and data connection with the remote FTP server and quit to
user view.
This command has the same effect as that of
the quit command.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Terminate the connections with the remote
FTP server and quit to user view.
[ftp] bye
221 Server closing.
<H3C>
Syntax
cd pathname
View
FTP client view
Parameter
pathname:
Path name
Description
Use the cd command to change the
work directory on the remote FTP server.
Note that you can use this command to enter
only authorized directories.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Change the work directory to flash:/temp.
[ftp] cd flash:/temp
# Display the current work directory.
[ftp] pwd
257 "flash:/temp" is
current directory.
Syntax
cdup
View
FTP client view
Parameter
None
Description
Use the cdup command to exit the
current work directory and enter the parent directory.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas Imperial
Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Change the work directory to flash:/temp.
[ftp] cd flash:/temp
# Change the work directory to the parent
directory.
[ftp] cdup
# Display the current directory.
[ftp] pwd
257 "flash:" is current
directory.
Syntax
close
View
FTP client view
Parameter
None
Description
Use the close command to terminate
an FTP connection without quitting FTP client view.
This command has the same effect as that of
the disconnect command.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Terminate the FTP connection without quitting
FTP client view.
[ftp] close
221 Server closing.
[ftp]
Syntax
debugging
undo debugging
View
FTP client view
Parameter
None
Description
Use the debugging command to enable
system debugging.
Use the undo debugging command to
disable system debugging.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Enable system debugging.
[ftp] debugging
Debug is on.
Syntax
delete remotefile
View
FTP client view
Parameter
remotefile:
File name
Description
Use the delete command to delete a
specified remote file.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password,
please
Password:
230 Logged in successfully
[ftp]
# Delete the file named temp.c.
[ftp] delete temp.c
250 DELE command successful.
Syntax
dir [
filename [ localfile ] ]
View
FTP client view
Parameter
filename: Name
of the file to be queried.
localfile:
Name of the local file where the query result is to be saved.
Description
Use the dir command to query
specified files on a remote FTP server, or to display file information in the
current directory. The output information, which includes the name, size and
creation time of files, will be saved in a local file.
If you do not specify the filename
argument, the information about all the files in the current directory is
displayed.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Display the information about all the files
in the current directory on the remote FTP server.
[ftp] dir
200 PORT command okay
150 File Listing Follows in ASCII
mode
-rwxrwxrwx 1 noone nogroup
430585 Dec 21 2004 4.app
-rwxrwxrwx 1 noone nogroup
430585 Dec 21 2004 5.app
-rwxrwxrwx 1 noone nogroup
430585 Dec 23 2004 6. app
-rwxrwxrwx 1 noone nogroup
430585 Dec 21 2004 6. app.bak
-rwxrwxrwx 1 noone nogroup
638912 Nov 15 2004 abc.BTM
drwxrwxrwx 1 noone
nogroup 0 Dec 15 2004 TEST
-rwxrwxrwx 1 noone nogroup
3212176 Jul 14 2004 21.bin
226 Transfer finished successfully.
FTP: 5346 byte(s) received in 6.782
second(s) 788.00 byte(s)/sec.
# Display the information about the file named
4.app and save the output information in the file named temp1.
[ftp] dir 4.app temp1
200 PORT command okay
150 File Listing Follows in ASCII
mode
-rwxrwxrwx 1 noone nogroup
430585 Dec 21 2004 4. app
226 Transfer finished successfully.
FTP: 70 byte(s) received in 0.122
second(s) 573.00 byte(s)/sec.
Syntax
disconnect
View
FTP client view
Parameter
None
Description
Use the disconnect command to terminate
a FTP connection without quitting FTP client view.
This command has the same effect as that of
the close command.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Terminate the FTP connection without quitting
FTP Client view.
[ftp] disconnect
221 Server closing.
[ftp]
Syntax
display ftp source-ip
View
Any view
Parameter
None
Description
Use the display ftp source-ip command
to display the source IP address that the FTP client uses every time it connects
to an FTP server. If a source interface is specified for the FTP client, the IP
address of the source interface will be displayed. If neither a source IP
address nor source interface is specified for the FTP client, 0.0.0.0 will be
displayed.
Example
# Display the source IP address that the
FTP client uses every time it connects to an FTP server.
<H3C> display ftp source-ip
The source IP you specified is
192.168.0.1
Syntax
ftp [ cluster
| remote-server [ port-number ] ]
View
User view
Parameter
cluster:
Specifies to connect to a cluster FTP server.
remote-server: Host name or the IP address of an FTP server. Note that the host
name can be a string comprising 1 to 20 characters.
port-number:
Port number of the FTP server, ranging from 0 to 65535. The default is 21.
Description
Use the ftp command to establish a
control connection with an FTP server and enter FTP client view.
Example
# Connect to the FTP server whose IP
address is 2.2.2.2.
<H3C> ftp
2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
Syntax
ftp {
cluster | remote-server } source-interface interface-type
interface-number
View
User view
Parameter
cluster: Specifies
to connect to a cluster FTP server.
remote-server: IP address or host name of the FTP server.
interface-type: Type of the source interface.
interface-number: Number of the source interface.
Description
Use the ftp { cluster | remote-server
} source-interface command to connect to an FTP server through the
specified source interface. This command will fail to be executed if the specified
interface does not exist.
Example
# Connect to the FTP server whose IP
address is 192.168.8.8 through the source interface Vlan-interface1.
<H3C> ftp 192.168.8.8 source-interface Vlan-interface 1
Syntax
ftp {
cluster | remote-server } source-ip ip-address
View
User view
Parameter
cluster:
Specifies to connect to a cluster FTP server.
remote-server: IP address or host name of the FTP server.
ip-address: Source
IP address.
Description
Use the ftp { cluster | remote-server
} source-ip command to connect to an FTP server through the
specified source IP address. This command will fail to be executed if the
specified source IP address does not exist.
Example
# Connect to the FTP server whose IP
address is 192.168.8.8 through the source IP address 192.168.0.1.
<H3C> ftp 192.168.8.8 source-ip
192.168.0.1
Syntax
ftp source-interface interface-type interface-number
undo ftp source-interface
View
System view
Parameter
interface-type: Type of the source interface.
interface-number: Number of the source interface.
Description
Use the ftp source-interface command
to specify a source interface as the fixed source interface the FTP client uses
every time it connects to an FTP server. This command will fail to be executed
if the specified interface does not exist.
Use the undo ftp source-interface command
to cancel the source interface setting. After you execute this command, the FTP
client system decides which interface will be used for accessing FTP servers.
Example
# Specify Vlan-interface1 as the fixed source
interface to be used in each connection between the FTP client and an FTP
server.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] ftp source-interface
Vlan-interface 1
Syntax
ftp source-ip ip-address
undo ftp source-ip
View
System view
Parameter
ip-address: IP
address that is to be specified as the source IP address.
Description
Use the ftp source-ip command to specify
the source IP address of an FTP client that the FTP client uses every time it
connects to an FTP server. The value of argument ip-address must be an
IP address on the device where the configuration is performed. Otherwise, a
prompt appears to show the configuration fails.
Use the undo ftp source-ip command
to cancel the source IP address setting. After you execute this command, the
FTP client system decides which IP address on it will be used for accessing FTP
servers.
Example
# Specify 192.168.0.1 as the source IP
address that the FTP client uses every time it connects to an FTP server.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] ftp source-ip 192.168.0.1
Syntax
get remotefile
[ localfile ]
View
FTP client view
Parameter
remotefile: Name
of a file on an FTP server.
localfile:
Name of a local file.
Description
Use the get command to download a
remote file and save it as a local file.
If you do not specify the localfile
argument, the downloaded file is saved with its original name.
Caution:
When using the get
command to download files from a remote FTP server, note to limit the lengths
of file path and file name within the following ranges regulated for an S3600
Ethernet switch.
l
A directory name should be no more than 91
characters.
l
A file name plus its local path name should be
no more than 127 characters.
l
A device name should be no more than 14
characters.
l
A file name plus its complete path name should
be no more than 142 characters.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Download the file named temp.c.
[ftp] get temp.c
200 Port command okay.
150 Opening ASCII mode data
connection for temp.c.
...............226 Transfer complete.
FTP: 749881 byte(s) received in
17.186 second(s) 43.00K byte(s)/sec.
Syntax
lcd
View
FTP client view
Parameter
None
Description
Use the lcd command to display the local
work directory on the FTP client.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Display the local work directory.
[ftp] lcd
% Local directory now flash:/temp
Syntax
ls [ remotefile
[ localfile ] ]
View
FTP client view
Parameter
remotefile:
Name of the remote file to be queried.
Localfile:
Name of the local file where the querying result is to be saved.
Description
Use the ls command to display the
information about a specified file on a remote FTP server.
If you do not specify the remotefile
argument, names of all the files in the current remote directory are displayed.
Caution:
The ls command only displays file names, while the dir
command displays file information in more detail, including file size, creation
date and so on.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Display the names of all the files in the
current directory on the remote FTP server.
[ftp] ls
200 PORT command okay
150 File Listing Follows in ASCII
mode
4.app
5.app
6.app
6.app.bak
abc.BTM
TEST
21.bin
226 Transfer finished successfully.
FTP: 1235 byte(s) received in 1.595
second(s) 774.00byte(s)/sec.
Syntax
mkdir pathname
View
FTP client view
Parameter
pathname: Path
name.
Description
Use the mkdir command to create a
directory on an FTP server.
This command is available only to the FTP
clients that are assigned the permission to create directories on FTP servers.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Create the directory flash:/lanswitch on
the FTP server.
[ftp] mkdir flash:/lanswitch
257 "flash:/ lanswitch" new
directory created.
Syntax
open { ip-address
| server-name } [ port ]
View
FTP client view
Parameter
ip-address: IP
address of an FTP server.
server-name:
Host name of the FTP server, a string comprising 1 to 20 characters.
port: Port
number on the remote FTP server, ranging from 0 to 65535. The default value is
21.
Description
Use the open command to establish a
control connection with an FTP server.
Related command: close.
Example
# Enter FTP client view.
<H3C> ftp
[ftp]
# Establish a control connection with the
FTP server whose IP address is 1.1.1.1.
[ftp]open 1.1.1.1
Trying ...
Press CTRL+K to abort
Connected.
220-
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):abc
331 Give me your password, please
Password:
230 Logged in successfully
Syntax
passive
undo passive
View
FTP client view
Parameter
None
Description
Use the passive command to set the
data transfer mode to the passive mode.
Use the undo passive command to set
the data transfer mode to the active mode.
By default, the passive mode is adopted.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Set the data transfer mode to the passive
mode.
[ftp] passive
% Passive is on
Syntax
put localfile
[ remotefile ]
View
FTP client view
Parameter
localfile: Name
of a local file.
remotefile: File
name which the local file is to be saved as on the remote FTP server.
Description
Use the put command to upload a
local file to an FTP server.
If you do not specify the remotefile
argument, the local file is saved on the FTP server with its original name.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Upload the local file named temp.c to the
FTP server.
[ftp] put temp.c
200 Port command okay.
150 Opening ASCII mode data
connection for temp.c.
226 Transfer complete.
FTP: 749881 byte(s) sent in 17.691
second(s) 42.00Kbyte(s)/sec.
Syntax
pwd
View
FTP Client view
Parameter
None
Description
Use the pwd command to display the
work directory on an FTP server.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Display the work directory on the FTP
server.
[ftp] pwd
257 "flash:/temp" is
current directory.
Syntax
quit
View
FTP client view
Parameter
None
Description
Use the quit command to terminate
FTP control connection and FTP data connection and quit to user view.
This command has the same effect as that of
the bye command.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Terminate the FTP control connection and FTP
data connection and quit to user view.
[ftp] quit
221 Windows FTP Server (WFTPD, by
Texas Imperial Software) says goodbye
<H3C>
Syntax
remotehelp [
protocol-command ]
View
FTP client view
Parameter
protocol-command:
FTP protocol command.
Description
Use the remotehelp command to
display the help information about an FTP protocol command.
This command works only when the FTP server
provides the help information about FTP protocol commands.
Caution:
l
This command is always valid when a H3C series
switch operates as the FTP server.
l
If you use other FTP server software, refer to
related instructions to know whether the FTP server provides help information
about FTP protocol commands.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Display the syntax of the user
command.
[ftp] remotehelp user
214 Syntax: USER <sp>
<username>
Syntax
rename remote-source
remote-dest
View
FTP client view
Parameter
remote-source:
Name of a file on a remote host.
remote-dest:
Destination file name.
Description
Use the rename command to rename a
file on a remote FTP server.
If the destination file name conflicts with
the name of an existing file or directory, you will fail to rename the file.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Rename the file named temp.c as forever.c.
[ftp] rename temp.c forever.c
350 Enter the name to rename it to...
250 File renamed successfully
Syntax
rmdir pathname
View
FTP client view
Parameter
pathname: Name
of a directory on an FTP server.
Description
Use the rmdir command to remove a
specified directory on an FTP server.
Note that you can only use this command to
remove directories that are empty.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Remove the directory flash:/temp1 on the
FTP server. (Assume that the directory is empty.)
[ftp] rmdir flash:/temp1
200 RMD command successful.
Syntax
user username
[ password ]
View
FTP client view
Parameter
username: User
name used to log into an FTP server.
password: Password
used to log into an FTP server.
Description
Use the user command to log into an FTP
server with the specified user name and password.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Log into the FTP server using the user account
with the user name being tom and the password being 111.
[ftp] user tom 111
331 Give me your password, please
230 Logged in successfully
Syntax
verbose
undo verbose
View
FTP client view
Parameter
None
Description
Use the verbose command to enable the
verbose function, which displays execution and response information of other
related commands.
Use the undo verbose command to
disable the verbose function.
The verbose function is enabled by default.
Example
# Enter FTP client view.
<H3C> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 WFTPD 2.0 service (by Texas
Imperial Software) ready for new user
User(none):switch
331 Give me your password, please
Password:
230 Logged in successfully
[ftp]
# Enable the verbose function.
[ftp] verbose
Syntax
display tftp source-ip
View
Any view
Parameter
None
Description
Use the display tftp source-ip display
the source IP address that the TFTP client uses every time it connects to a TFTP
server. If a source interface is specified for the TFTP client, the IP address
of the source interface will be displayed. If neither source IP address nor
source interface is specified for the TFTP client, 0.0.0.0 will be displayed.
Example
# Display the source IP address that the TFTP
client uses every time it connects to a TF