华为交换机配置命令详解(华为交换机配置保存命令)
1、查看当前所处的目录(pwd)
flash:
2、查看目录文件(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
32,004 KB total (31,995 KB free)
3、进入目录(cd)
STRING<1-64>The total length of absolute path is 64,the length of single directory is 15
flash: Device name
flash:/dhcp
Directory of flash:/dhcp/
Idx Attr Size(Byte) Date Time FileName
0 -rw- 98 Apr 02 2016 11:29:53 dhcp-duid.txt
32,004 KB total (31,995 KB free)
4、创建目录(mkdir)
Info: Create directory flash:/023wg.com......Done.
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 023wg.com
32,004 KB total (31,993 KB free)
5、删除目录(rmdir)
被删除的目录必须为空目录。目录被删除后,无法从回收站中恢复,原目录下被删除的文件也彻底从回收站中删除。
Directory of flash:/023wg.com/
Idx Attr Size(Byte) Date Time FileName
0 drw- - Apr 02 2016 19:44:09 test
32,004 KB total (31,992 KB free)
---------------------
STRING<1-64>The total length of absolute path is 64,the length of single
directory is 15
flash: Device name
Remove directory flash:/023wg.com?[Y/N]:y
%Removing directory flash:/023wg.com...
Error: Directory is not empty. # 错误 目录不是空目录
6、显示文件的内容(more)
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 023wg.com
32,004 KB total (31,992 KB free)
Directory of flash:/dhcp/
Idx Attr Size(Byte) Date Time FileName
0 -rw- 98 Apr 02 2016 11:29:53 dhcp-duid.txt
32,004 KB total (31,992 KB free)
*Huawei DHCP DUID*
*time* 2016-04-02 11:29:53
*version* 1
#DUID_LL: 000300015489984A66E2
*end*
7、复制文件(copy)
不能复制文件夹,只能复制文件到文件下。在拷贝文件前,确保存储器有足够的空间。若目标文件名与已经存在的文件名重名,将提示是否覆盖。
Directory of flash:/dhcp/
Idx Attr Size(Byte) Date Time FileName
0 -rw- 98 Apr 02 2016 11:29:53 dhcp-duid.txt
32,004 KB total (31,992 KB free)
STRING<1-64>[drive][path][file name]
flash: Device name
Copy flash:/dhcp/dhcp-duid.txt to flash:/dhcp-duid.txt?[Y/N]:y
100% complete
Info: Copied file flash:/dhcp/dhcp-duid.txt to flash:/dhcp-duid.txt...Done.
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 023wg.com
6 -rw- 98 Apr 02 2016 20:02:10 dhcp-duid.txt
32,004 KB total (31,991 KB free)
8、移动文件(move)
Directory of flash:/src/
Idx Attr Size(Byte) Date Time FileName
0 -rw- 772 Apr 02 2016 11:29:32 patchfile.src
1 -rw- 772 Apr 02 2016 11:29:32 patchfilenext.src
32,004 KB total (31,990 KB free)
STRING<1-64>[drive][path][file name]
flash: Device name
flash:
Move flash:/src/patchfile.src to flash:/patchfile.src ?[Y/N]:y
%Moved file flash:/src/patchfile.src to flash:/patchfile.src.
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 023wg.com
6 -rw- 98 Apr 02 2016 20:02:10 dhcp-duid.txt
7 -rw- 772 Apr 02 2016 11:29:32 patchfile.src
32,004 KB total (31,989 KB free)
9、重命名文件(rename)
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 023wg.com
6 -rw- 98 Apr 02 2016 20:02:10 dhcp-duid.txt
7 -rw- 772 Apr 02 2016 11:29:32 patchfile.src
32,004 KB total (31,989 KB free)
STRING<1-64>[drive][path][file name]
flash: Device name
Rename flash:/dhcp-duid.txt to flash:/1dhcp-duid.txt ?[Y/N]:y
Info: Rename file flash:/dhcp-duid.txt to flash:/1dhcp-duid.txt ......Done.
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 023wg.com
6 -rw- 772 Apr 02 2016 11:29:32 patchfile.src
7 -rw- 98 Apr 02 2016 20:02:10 1dhcp-duid.txt
32,004 KB total (31,989 KB free)
10、压缩文件(zip)
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 023wg.com
6 -rw- 772 Apr 02 2016 11:29:32 patchfile.src
7 -rw- 98 Apr 02 2016 20:02:10 1dhcp-duid.txt
32,004 KB total (31,988 KB free)
Compress flash:/patchfile.src to flash:/patchfile.zip?[Y/N]:y
100% complete
%Compressed file flash:/patchfile.src to flash:/patchfile.zip.
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 023wg.com
6 -rw- 772 Apr 02 2016 11:29:32 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,987 KB free)
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 023wg.com
6 -rw- 772 Apr 02 2016 11:29:32 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,986 KB free)