VRP文件系统基础

你离开我真会死。 提交于 2019-12-01 17:33:05

基本查询命令

查看当前目录 pwd

pwd [ /all ] [ filename | directory ]
 <Huawei>pwd        
flash:

显示当前目录下的文件信息 dir

<Huawei>dir
Directory of flash:/
 Idx  Attr     Size(Byte)  Date        Time(LMT)  FileName 
 0  drw-              -        Oct 15 2019 12:26:48   dhcp
 1  -rw-        121,802  May 26 2014 09:20:58   portalpage.zip
 2  -rw-          2,263  Oct 16 2019 15:53:57   statemach.efs
 3  -rw-        828,482  May 26 2014 09:20:58   sslvpn.zip

查看文本文件的具体内容 more

<Huawei>more dhcp-duid.txt 
*Huawei DHCP DUID*
*time* 2019-10-15 20:26:47
*version* 1
#DUID_LL: 0003000100E0FCEF695B
*end*

目录操作

切换目录 cd

 <Huawei>cd ../

创建新的目录 mkdir

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

删除目录 rmdir

<Huawei>rmdir /te
<Huawei>rmdir /test/ 
Remove directory flash:/test? (y/n)[n]:y    
%Removing directory flash:/test...Done!

文件操作

复制文件 copy

<Huawei>copy dhcp-duid.txt flash:/test/ 
Copy flash:/dhcp/dhcp-duid.txt to flash:/test/dhcp-duid.txt? (y/n)[n]:y
100%  complete
Info: Copied file flash:/dhcp/dhcp-duid.txt to flash:/test/dhcp-duid.txt...Done

重命名文件 rename

<Huawei>rename dhcp-duid.txt a.txt
Rename flash:/test/dhcp-duid.txt to flash:/test/a.txt? (y/n)[n]:y
Info: Rename file flash:/test/dhcp-duid.txt to flash:/test/a.txt ......Done

移动文件 move

<Huawei>move a.txt flash:/dhcp/ 
Move flash:/test/a.txt to flash:/dhcp/a.txt? (y/n)[n]:y
%Moved file flash:/test/a.txt to flash:/dhcp/a.txt.

删除文件 delete

<Huawei>delete /dhcp/a.txt 
Delete flash:/dhcp/a.txt? (y/n)[n]:y
Info: Deleting file flash:/dhcp/a.txt...succeed.

恢复删除的文件

<Huawei>undelete a.txt 
Undelete flash:/dhcp/a.txt? (y/n)[n]:y
%Undeleted file flash:/dhcp/a.txt.    

彻底删除回收站中的文件 reset recycle-bin

<Huawei>reset recycle-bin 
Squeeze flash:/dhcp/a.txt? (y/n)[n]:y
Clear file from flash will take a long time if needed...Done.
%Cleared file flash:/dhcp/a.txt.

配置文件查询

显示当前的配置文件 display current-configuration

<Huawei>display current-configuration
[V200R003C00]
wlan ac
return

显示保存的配置文件 display saved-configuration

<Huawei>display saved-configuration 
There is no correct configuration file in FLASH

设备启动流程

设备启动时,会自动从flash / SD 中加载配置文件到RAM中并作为当前的配置文件
配置文件已“cfg”或“zip”作为扩展名,存放在存储设备的根目录下
如果默认的存储路径中没有没有保存的配置文件,则会使用缺省参数进行初始化配置

查看系统启动配置参数 display startup

<B-1-48>display startup 
MainBoard:
////本次系统启动所使用的配置文件
Current startup saved-configuration file: flash:/startup.cfg
// 下次系统启动所使用的配置文件
Next main startup saved-configuration file: flash:/startup.cfg
Next backup startup saved-configuration file: NULL

系统启动配置文件修改

<Huawei>startup saved-configuration a.zip
This operation will take several minutes, please wait.....
Info: Succeeded in setting the file for booting system 
<Huawei>display startup
MainBoard: 
Startup system software:                   null
Next startup system software:              null
Backup system software for next startup:   null
Startup saved-configuration file:          flash:/vrpcfg.zip
Next startup saved-configuration file:     flash:/a.zip

清除下次启动时加载的配置文件

<Huawei>reset saved-configuration 
This will delete the configuration in the flash memory.
The device configurations will be erased to reconfigure.
Are you sure? (y/n)[n]:y
Clear the configuration in the device successfully.   
<Huawei>display startup 
MainBoard: 
Startup system software:                   null
Next startup system software:              null
Backup system software for next startup:   null
Startup saved-configuration file:          null
Next startup saved-configuration file:     null

存储设备

Flash     闪存
SD Card   SD卡
USB

存储设备修复 fixdisk flash:

<Huawei>fixdisk flash: 
Fixdisk flash: will take long time if needed
%Fixdisk flash: completed.

存储设备格式化 format flash

<Huawei>format flash: 
All data(include configuration and system startup file) on flash: will be lost , proceed with format? (y/n)[n]:
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!