Managing Files

You can log in to the file system to view, delete, or rename files on a device.

Context

  • Managing files include displaying file content, copying files, moving files, renaming files, compressing files, deleting files, restoring deleted files, deleting files in the recycle bin, running batch files, and configuring notification modes.
  • To operate a file, run the cd directory command to switch the current directory to the file's directory.

Procedure

  • Run more file-name

    The content of a specified file is displayed.

  • Run copy source-filename destination-filename

    A file is copied.

  • Run move source-filename destination-filename

    A file is moved.

  • Run rename source-filename destination-filename

    A file is renamed.

  • Run zip source-filename destination-filename

    A file is compressed.

  • Run unzip source-filename destination-filename

    A file is decompressed.

  • Run delete [ /unreserved ] filename [ all ]

    A file is deleted.

    If you use the /unreserved parameter in the command, the file cannot be restored after being deleted.

    In VS mode, this command is supported only by the admin VS.

  • Run undelete filename

    The deleted file is restored.

    You can run the dir /all command to view information about all files, including the files moved to the recycle bin, which are enclosed in square brackets ([]).

    The files that are deleted using the delete command with /unreserved specified cannot be restored.

    In VS mode, this command is supported only by the admin VS.

  • Run reset recycle-bin [ /f | filename ]

    A file in the recycle bin is deleted.

    You can permanently delete files in the recycle bin. The /f parameter indicates that all files in the recycle bin are deleted without prompting for your confirmation.

  • Run tail file-name

    The information in the last lines of a specified file is displayed.

  • Run a batch or VRP Shell Languages (VSL) script file.

    To perform multiple operations on a file at a time, create and run a batch file. The created batch file must be saved in a device's storage component in advance.

    To run a batch file, perform the following steps:

    1. Run system-view

      The system view is displayed.

    2. Run execute filename [ parameter &<1-8> ]

      A batch or VSL script file is run.

  • Configure a notification mode.

    The system displays a notification or warning message when you operate a device (especially operations leading to data loss). To change the notification mode for file operations, perform the following steps:

    1. Run system-view

      The system view is displayed.

    2. Run file prompt { alert | quiet }

      A notification mode is configured.

      If the notification mode is set to quiet, the system does not display a warning message for data loss caused by misoperations.

    3. Run commit

      The configuration is committed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic