Managing the directories on the ftp server, Working with the files on the ftp server – H3C Technologies H3C S12500 Series Switches User Manual

Page 80

Advertising
background image

68

Managing the directories on the FTP server

After the device establishes a connection to the FTP server, you can create or delete folders under the

authorized directory on the FTP server.
To manage the directories on an FTP server:

Task Command

Display detailed information about a directory or file on the
remote FTP server.

dir [ remotefile [ localfile ] ]

Query a directory or file on the remote FTP server.

ls [ remotefile [ localfile ] ]

Change the working directory of the remote FTP server.

cd { directory | .. | / }

Return to the upper level directory of the remote FTP server.

cdup

Display the working directory that is being accessed.

pwd

Create a directory on the remote FTP server.

mkdir directory

Remove the specified working directory on the remote FTP
server.

rmdir directory

Working with the files on the FTP server

After you log in to the server, you can upload a file to or download a file from the authorized directory

by following these steps:

1.

Use the dir or ls command to display the directory and the location of the file on the FTP server.

2.

Delete unused files to get more free storage space.

3.

Set the file transfer mode. FTP transmits files in two modes: ASCII and binary. ASCII mode transfers
files as text. Binary mode transfers files as raw data.

4.

Use the lcd command to display the local working directory of the FTP client. You can upload the
file or save the downloaded file under this directory.

5.

Upload or download a file.

To work with the files on an FTP server:

Task Command

Remarks

Display detailed information
about a directory or file on the

remote FTP server.

dir [ remotefile [ localfile ] ]

The ls command displays the name of a
directory or file only, while the dir

command displays detailed information

such as the file size and creation time.

Query a directory or file on the
remote FTP server.

ls [ remotefile [ localfile ] ]

The ls command displays the name of a
directory or file only, while the dir

command displays detailed information
such as the file size and creation time.

Delete the specified file on the
remote FTP server permanently.

delete remotefile

N/A

Set the file transfer mode to
ASCII.

ascii

By default, ASCII mode is used.

Advertising