0% found this document useful (0 votes)
22 views19 pages

HC110110010 File System Navigation and Management

Uploaded by

Asmaa Boughrara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views19 pages

HC110110010 File System Navigation and Management

Uploaded by

Asmaa Boughrara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

The file system manages files and directories on the storage devices.

It can create, delete,


modify, or rename a file or directory, or display the contents of a file.

The file system has two functions: managing storage devices and managing the files that
are stored on those devices. A number of directories are defined within which files are
stored in a logical hierarchy. These files and directories can be managed through a
number of functions which allow the changing or displaying of directories, displaying files
within such directories or sub-directories, and the creation or deletion of directories.

Common examples of file system commands for general navigation include the cd
command used to change the current directory, pwd to view the current directory and dir
to display the contents of a directory as shown in the example. Access to the file system
is achieved from the User View.
Making changes to the existing file system directories generally relates to the capability to
create and delete existing directories within the file system. Two common commands that
are used in this case. The mkdir directory command is used to create a folder in a
specified directory on a designated storage device, where directory refers to the name
given to the directory and for which the directory name can be a string of 1 to 64
characters. In order to delete a folder within the file system, the rmdir directory command
is used, with directory again referring to the name of the directory. It should be noted that
a directory can only be deleted if there are no files contained within that directory.
Making changes to the files within a file system includes copying, moving, renaming,
compressing, deleting, undeleting, deleting files in the recycle bin, running files in batch
and configuring prompt modes. Creating a duplicate of an existing file can be done using
the copy source-filename destination-filename command, where if the destination-
filename is the same as that of an existing file (source-filename), the system will display a
message indicating that the existing file will be replaced. A target file name cannot be the
same as that of a startup file, otherwise the system displays a message indicating that the
operation is invalid and that the file is a startup file.

The move source-filename destination-filename command can be used to move files to


another directory. After the move command has been successfully executed, the original
file is cut and moved to the defined destination file. It should be noted however that the
move command can only move files in the same storage device.
For the removal of files within a file system, the delete function can be applied using the
command delete [ /unreserved ] [ /force ] { filename | device-name }. Generally files that
are deleted are directed to a recycle bin from where files can recovered using the
undelete { filename | device-name } command, however should the /unreserved command
be used, the file will be permanently deleted. The system will generally display a message
asking for confirmation of file deletion, however if the /force parameter is included, no
prompt will be given. The filename parameter refers to the file which is to be deleted,
while the device-name parameter defines the storage location.

Where a file is directed to the recycle bin, it is not permanently deleted and can be easily
recovered. In order to ensure that such files in the recycle bin are deleted permanently,
the reset recycle-bin [ filename ]command can be applied, where the filename parameter
can be used to define a specific file for permanent deletion.
When powered on, the device retrieves configuration files from a default save path to
initialize itself, which is then stored within the RAM of the device. If configuration files do
not exist in the default save path, the router uses default initialization parameters.

The current-configuration file indicates the configurations in effect on the device when it is
actually running. When the configuration is saved, the current configuration is stored in a
saved-configuration file within the storage location of the device. If the device loaded the
current-configuration file based on default initialization parameters, a saved-configuration
file will not exist in the storage location of the default save path, but will be generated
once the current configuration is saved.
Using the display current-configuration command, device parameters that take effect can
be queried. If default values of certain parameters are being used, these parameters are
not displayed. The current-configuration command includes a number of parameters that
allow for filtering of the command list during the used of the display function. The display
current-configuration | begin {regular-expression} is an example of how the current-
configuration can be used to display active parameters that begin with a specific keyword
or expression. An alternative to this command is the display current-configuration | include
{regular-expression} which allows parameters that include a specific keyword or
expression within the current-configuration file.

The display saved-configuration [ last | time ] shows the output of the stored configuration
file used at startup to generate the current-configuration. Where the last parameter is
used it displays the configuration file used in the current startup. The configuration file is
displayed only when it is configured for the current startup. The time parameter will
display the time when the configuration was last saved.
Using the save [configuration-file] command will save the current configuration information
to a default storage path. The configuration-file parameter allows the current configuration
information to be saved to a specified file. Running the save command with the
configuration-file parameter does not affect the current startup configuration file of the
system. When configuration-file is the same as the configuration file stored in the default
storage path of the system, the function of this command is the same as that of the save
command.

The example demonstrates the use of the save command to save the current-
configuration, which by default will be stored to the default vrpcfg.zip file in the default
storage location of the device.
The currently used save configuration file can be discovered through the use of the
display startup command. In addition the display startup command can be used to query
the name of the current system software file, name of the next system software file, name
of the backup system software file, names of the four currently used (if used) system
software files, and names of the next four system software files. The four system software
files are the aforementioned configuration file, voice file, patch file, and license file.
Following discovery of the startup saved-configuration file, it may be necessary to define a
new configuration file to be loaded at the next startup. If a specific configuration file is not
specified, the default configuration file will be loaded at the next startup.

The filename extension of the configuration file must be .cfg or .zip, and the file must be
stored in the root directory of a storage device. When the router is powered on, it reads
the configuration file from the flash memory by default to initialize. The data in this
configuration file is the initial configuration. If no configuration file is saved in the flash
memory, the router uses default parameters to initiate.

Through the use of the startup saved-configuration [configuration-file] where the


configuration-file parameter is the configuration file to be used at startup, it is possible to
define a new configuration file to initialize at the next system startup.
When the compare configuration [configuration-file] [current-line-number save-line-
number] command is used, the system performs a line by line comparison of the saved
configuration with the current configuration starting from the first line. If the current-line-
number save-line-number parameters are specified, the system skips the non-relevant
configuration before the compared lines and continues to find differences between the
configuration files.

The system will then proceed to output the configuration differences between the saved
configuration and the current configuration files. The comparison output information is
restricted to 150 characters by default. If the comparison requires less than 150
characters, all variations until the end of two files are displayed.
The reset saved-configuration command is used in order to delete a device startup
configuration file from the storage device. When performed, the system compares the
configuration files used in the current startup and the next startup when deleting the
configuration file from the router.

If the two configuration files are the same, they are deleted at the same time after this
command is executed. The default configuration file is used when the router is started
next time. If the two configuration files are different, the configuration file used in the
current startup is deleted after this command is executed.

If no configuration file is configured for the device current startup, the system displays a
message indicating that the configuration file does not exist after this command is
executed. Once the reset saved-configuration command is used, a prompt will be given to
confirm the action, for which the user is expected to confirm, as shown in the example.
The storage devices are product dependant, and include flash memory, SD cards, or USB
flash drives. The AR2200E router for example has a built-in flash memory and a built-in
SD card (in slot sd1). The router provides two reserved USB slots (usb0 and usb1) and an
SD card slot (sd0). For the S5700 it includes a built-in flash memory with a capacity that
varies dependant on the model, with 64MB supported in the S5700C-HI, S5700-LI,
S5700S-LI and S5710-EI models, and 32 MB for all others. The details regarding the
Huawei product storage devices can be detailed by using the display version command
as shown.
Formatting a storage device is likely to result in the loss of all files on the storage device,
and the files cannot be restored, therefore extra care should be taken when performing
any format command and should be avoided unless absolutely necessary. The format
[storage-device] command is used along with the storage-device parameter to define the
storage location which is required to be formatted.
When the terminal device displays that the system has failed, the fixdisk command can be
used to attempt to fix the abnormal file system in the storage device, however it does not
provide any guarantee as to whether the file system can be restored successfully. Since
the command is used to rectify problems, if no problem has occurred in the system it is
not recommended that this command be run. It should also be noted that this command
does not rectify device-level problems.
The file system attribute d represents that the entry is a directory in the file system. It
should be noted that this directory can only be deleted once any files contained within the
directory have been deleted. The remaining rwx values refer to whether the directory (or
file) can be read, written to, and/or executed.

A configuration may be saved under a separate name from the default vrpcfg.zip file
name and stored within the storage device of the router or switch. If this file is required to
be used as the active configuration file in the system, the command startup saved-
configuration <configuration-file-name> should be used where the configuration-file-name
refers to the file name and file extension.

You might also like