< Home

Example for Logging In to the Switch to Manage Files

Overview

You can log in to the switch using the console port, Telnet, or STelnet to manage storage, directories, and local files. Only logged in users can manage the storage. To transfer files, you can use FTP, TFTP, Secure Copy Protocol (SCP), or FTPS.

Configuration Notes

  • Before logging in to the switch to manage files, complete the following task:
    • Log in to the switch from a terminal.
  • This example applies to all versions of all S series switches.

The following uses the command lines and outputs of the S5720-EI running V200R008C00 as an example.

Networking Requirements

A user logs in to the Switch using the console port, Telnet, or STelnet from the PC, and needs to perform the following operations on the files on the Switch:

  • View the files and subdirectories in the current directory.
  • Create the directory test. Copy the file vrpcfg.zip to test and rename the file as backup.zip.
  • View files in test.
Figure 1 Networking diagram for logging in to the switch to manage files

Procedure

  1. View the files and subdirectories in the current directory.

    <HUAWEI> system-view
    [HUAWEI] sysname Switch
    [Switch] quit
    <Switch> dir
    Directory of flash:/
    
      Idx  Attr     Size(Byte)  Date        Time       FileName
        0  -rw-            889  Mar 01 2012 14:41:56   private-data.txt
        1  -rw-          6,311  Feb 17 2012 14:05:04   backup.cfg
        2  -rw-          2,393  Mar 06 2012 17:20:10   vrpcfg.zip
        3  -rw-            812  Dec 12 2011 15:43:10   hostkey
        4  drw-              -  Mar 01 2012 14:41:46   compatible
        5  -rw-            540  Dec 12 2011 15:43:12   serverkey
    ...
    509,256 KB total (52,752 KB free)

  2. Create the directory test. Copy the file vrpcfg.zip to test and rename the file as backup.zip.

    # Create the directory test.

    <Switch> mkdir test
    Info: Create directory flash:/test......Done.

    # Copy the file vrpcfg.zip to test and rename the file as backup.zip.

    <Switch> copy vrpcfg.zip flash:/test/backup.zip    //Set the target file name to backup.zip. If not specified, the target file name is the same as the source file name.
    Copy flash:/vrpcfg.zip to flash:/test/backup.zip?[Y/N]:y
    100%  complete/
    Info: Copied file flash:/vrpcfg.zip to flash:/test/backup.zip...Done. 

  3. View files in test.

    # Access test.

    <Switch> cd test

    # View the current directory.

    <Switch> pwd
    flash:/test

    # View files in test.

    <Switch> dir
    Directory of flash:/test/
    
      Idx  Attr     Size(Byte)  Date        Time       FileName
        0  -rw-          2,399  Mar 12 2012 11:16:44   backup.zip
    
    509,256 KB total (52,748 KB free)

Configuration Files

Switch configuration file

#
sysname Switch
#
return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >