11、解压文件(unzip)
<Huawei>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time FileName
0 drw- - Aug 07 2015 13:51:14 src
1 drw- - Apr 02 2016 11:29:41 pmdata
2 drw- - Apr 02 2016 11:29:52 dhcp
3 -rw- 28 Apr 02 2016 11:29:53 private-data.txt
4 drw- - Apr 02 2016 11:44:58 mplstpoam
5 drw- - Apr 02 2016 19:41:46 http://023wg.com
6 -rw- 98 Apr 02 2016 20:02:10 1dhcp-duid.txt
7 -rw- 135 Apr 02 2016 20:31:02 patchfile.zip
32,004 KB total (31,985 KB free)
<Huawei>unzip patchfile.zip patchfile.src
Extract flash:/patchfile.zip to flash:/patchfile.src?[Y/N]:y
100% complete
%Decompressed file flash:/patchfile.zip to flash:/patchfile.src.
<Huawei>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time FileName
0 drw- - Aug 07 2015 13:51:14 src
1 drw- - Apr 02 2016 11:29:41 pmdata
2 drw- - Apr 02 2016 11:29:52 dhcp
3 -rw- 28 Apr 02 2016 11:29:53 private-data.txt
4 drw- - Apr 02 2016 11:44:58 mplstpoam
5 drw- - Apr 02 2016 19:41:46 http://023wg.com
6 -rw- 772 Apr 02 2016 20:50:28 patchfile.src
7 -rw- 98 Apr 02 2016 20:02:10 1dhcp-duid.txt
8 -rw- 135 Apr 02 2016 20:31:02 patchfile.zip
32,004 KB total (31,985 KB free)
<Huawei>
12、删除文件(delete)
此命令不能删除目录。如果使用参数/unreserved,则删除后的文件不可恢复。
<Huawei>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time FileName
0 drw- - Aug 07 2015 13:51:14 src
1 drw- - Apr 02 2016 11:29:41 pmdata
2 drw- - Apr 02 2016 11:29:52 dhcp
3 -rw- 28 Apr 02 2016 11:29:53 private-data.txt
4 drw- - Apr 02 2016 11:44:58 mplstpoam
5 drw- - Apr 02 2016 19:41:46 http://023wg.com
6 -rw- 772 Apr 02 2016 20:50:28 patchfile.src
7 -rw- 98 Apr 02 2016 20:02:10 1dhcp-duid.txt
8 -rw- 135 Apr 02 2016 20:31:02 patchfile.zip
32,004 KB total (31,985 KB free)
<Huawei>delete ?
/quiet Delete file without confirm by user # 删除文件不需要确认
/unreserved Delete a file permanently # 永久删除文件
STRING<1-64> [drive][path][file name]
flash: Device name
<Huawei>delete 1dhcp-duid.txt
Delete flash:/1dhcp-duid.txt?[Y/N]:y
Info: Deleting file flash:/1dhcp-duid.txt...succeeded.
<Huawei>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time FileName
0 drw- - Aug 07 2015 13:51:14 src
1 drw- - Apr 02 2016 11:29:41 pmdata
2 drw- - Apr 02 2016 11:29:52 dhcp
3 -rw- 28 Apr 02 2016 11:29:53 private-data.txt
4 drw- - Apr 02 2016 11:44:58 mplstpoam
5 drw- - Apr 02 2016 19:41:46 http://023wg.com
6 -rw- 772 Apr 02 2016 20:50:28 patchfile.src
7 -rw- 135 Apr 02 2016 20:31:02 patchfile.zip
32,004 KB total (31,985 KB free)
<Huawei>
13、恢复被删除的文件(undelete)
只能恢复回收站的文件,回收站里的文件查看方法为dir /all,如下为[]里面的文件
<Huawei>dir /all
Directory of flash:/
Idx Attr Size(Byte) Date Time FileName
0 drw- - Aug 07 2015 13:51:14 src
1 drw- - Apr 02 2016 11:29:41 pmdata
2 drw- - Apr 02 2016 11:29:52 dhcp
3 -rw- 28 Apr 02 2016 11:29:53 private-data.txt
4 drw- - Apr 02 2016 11:44:58 mplstpoam
5 drw- - Apr 02 2016 19:41:46 http://023wg.com
6 -rw- 772 Apr 02 2016 20:50:28 patchfile.src
7 -rw- 135 Apr 02 2016 20:31:02 patchfile.zip
8 -rw- 772 Apr 02 2016 20:50:08 [patchfile]
9 -rw- 772 Apr 02 2016 11:29:32 [patchfile.src]
10 -rw- 98 Apr 02 2016 20:02:10 [1dhcp-duid.txt]
32,004 KB total (31,985 KB free)
<Huawei>undelete 1dhcp-duid.txt
Undelete flash:/1dhcp-duid.txt?[Y/N]:y
%Undeleted file flash:/1dhcp-duid.txt.
<Huawei>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time FileName
0 drw- - Aug 07 2015 13:51:14 src
1 drw- - Apr 02 2016 11:29:41 pmdata
2 drw- - Apr 02 2016 11:29:52 dhcp
3 -rw- 28 Apr 02 2016 11:29:53 private-data.txt
4 drw- - Apr 02 2016 11:44:58 mplstpoam
5 drw- - Apr 02 2016 19:41:46 http://023wg.com
6 -rw- 98 Apr 02 2016 20:02:10 1dhcp-duid.txt
7 -rw- 772 Apr 02 2016 20:50:28 patchfile.src
8 -rw- 135 Apr 02 2016 20:31:02 patchfile.zip
32,004 KB total (31,985 KB free)
<Huawei>
14、彻底删除回收站的文件(reset recycle-bin)
<Huawei>dir /all
Directory of flash:/
Idx Attr Size(Byte) Date Time FileName
0 drw- - Aug 07 2015 13:51:14 src
1 drw- - Apr 02 2016 11:29:41 pmdata
2 drw- - Apr 02 2016 11:29:52 dhcp
3 -rw- 28 Apr 02 2016 11:29:53 private-data.txt
4 drw- - Apr 02 2016 11:44:58 mplstpoam
5 drw- - Apr 02 2016 19:41:46 http://023wg.com
6 -rw- 98 Apr 02 2016 20:02:10 1dhcp-duid.txt
7 -rw- 772 Apr 02 2016 20:50:28 patchfile.src
8 -rw- 135 Apr 02 2016 20:31:02 patchfile.zip
9 -rw- 772 Apr 02 2016 20:50:08 [patchfile]
10 -rw- 772 Apr 02 2016 11:29:32 [patchfile.src]
32,004 KB total (31,985 KB free)
<Huawei>res
<Huawei>reset re
<Huawei>reset recycle-bin ?
STRING<1-64> [drive][path][file name]
flash: Device name
<cr>
Squeeze flash:/patchfile?[Y/N]:y
%Cleared file flash:/patchfile.
Squeeze flash:/patchfile.src?[Y/N]:y
%Cleared file flash:/patchfile.src.
<Huawei>dir /all
Directory of flash:/
Idx Attr Size(Byte) Date Time FileName
0 drw- - Aug 07 2015 13:51:14 src
1 drw- - Apr 02 2016 11:29:41 pmdata
2 drw- - Apr 02 2016 11:29:52 dhcp
3 -rw- 28 Apr 02 2016 11:29:53 private-data.txt
4 drw- - Apr 02 2016 11:44:58 mplstpoam
5 drw- - Apr 02 2016 19:41:46 http://023wg.com
6 -rw- 98 Apr 02 2016 20:02:10 1dhcp-duid.txt
7 -rw- 772 Apr 02 2016 20:50:28 patchfile.src
8 -rw- 135 Apr 02 2016 20:31:02 patchfile.zip
32,004 KB total (31,987 KB free)
<Huawei>
15、运行批处理文件(execute)
<Huawei>execute batch-filename
16、对存储器进行操作
当某存储器上的文件系统出现异常时,终端会给出提示信息,建议修复异常。
当文件系统的异常无法修复或者确认不再需要存储器上的所有数据时,可格式化存储器。格式化会清空存储器中的所有文件和目录。
格式化存储器,会导致数据无法恢复,请慎用。
16.1、修复文件系统异常的存储器
<Huawei>fixdisk flash:
Fix disk flash: will take long time if needed.
% Fix disk flash: completed.
<Huawei>
16.2、格式化存储器
<Huawei>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time FileName
0 drw- - Aug 07 2015 13:51:14 src
1 drw- - Apr 02 2016 11:29:41 pmdata
2 drw- - Apr 02 2016 11:29:52 dhcp
3 -rw- 28 Apr 02 2016 11:29:53 private-data.txt
4 drw- - Apr 02 2016 11:44:58 mplstpoam
5 drw- - Apr 02 2016 19:41:46 http://023wg.com
6 -rw- 98 Apr 02 2016 20:02:10 1dhcp-duid.txt
7 -rw- 772 Apr 02 2016 20:50:28 patchfile.src
8 -rw- 135 Apr 02 2016 20:31:02 patchfile.zip
32,004 KB total (31,987 KB free)
<Huawei>format ?
flash: Device name
<Huawei>format flash:
All data(include configuration and system startup file) on flash: will be lost ,
proceed with format ? [Y/N]:y
%Format flash: completed.
<Huawei>dir
Info: File can't be found in the directory.
32,004 KB total (32,002 KB free)
<Huawei>
17、配置文件系统提示方式
当在设备上进行操作时,系统可以给予提示或警示信息(特别是对于可能导致数据丢失或破坏的操作)。如果需要修改系统对文件操作的提醒方式时,可以进行配置文件系统提示方式的操作。
如果将文件操作的提醒方式设置为quiet,则对由于用户误操作(比如删除文件操作)而导致数据丢失的情况不作提示,请慎用。
[Huawei]file prompt ?
alert Enable the user to confirm
quiet Disable the user to confirm
18、XModem协议获取文件(仅支持通过Console口登录)
在通过Console登录设备时,可通过xmodem get命令,从终端直接获取所需的文件至设备。
<Huawei>xmodem get ?
STRING<1-64> [drive][path][file name]
flash: Device name
<Huawei>xmodem get