< Home

Example of Logging In to the Device to Manage Files

Networking Requirements

After logging in to the device through the console interface, Telnet, or STelnet, perform the following operations:

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

Procedure

  1. View 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
    ...
    65,233 KB total (7,289 KB free)

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

    # Create the test directory.

    <Switch> mkdir test
    

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

    <Switch> copy vrpcfg.zip flash:/test/backup.zip 
    

    If no target file name is specified, the source file and target file have the same name.

  3. View files in the test directory.

    # Access the test directory.

    <Switch> cd test

    # View the current working directory.

    <Switch> pwd
    flash:/test

    # View files in the test directory.

    <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
    
    65,233 KB total (7,285 KB free)

Configuration File

Switch configuration file

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