华为交换机系统文件管理配置命令大全(一)
首页 > HuaWei > 基础配置   作者:杭州清默网络  2016年9月21日 12:12 星期三  字号:   评论:0 条
时间:2016-9-21 12:12   评论:0 条 

华为交换机系统文件管理配置命令大全(一)

华为交换机系统文件管理介绍:http://www.023wg.com/jcpz/341.html

1、查看当前所处的目录(pwd

<Huawei>pwd

flash:

 <Huawei>

 

2、查看目录文件(dir

<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

32,004 KB total (31,995 KB free)

 

3、进入目录(cd

<Huawei>cd ?

  STRING<1-64>  The total length of absolute path is 64,the length of single directory is 15

  flash:        Device name

 

<Huawei>cd dhcp

<Huawei>pwd

flash:/dhcp

 

<Huawei>dir

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

<Huawei>mkdir 023wg.com

Info: Create directory flash:/023wg.com......Done.

<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   023wg.com

 

32,004 KB total (31,993 KB free)


5、删除目录(rmdir

被删除的目录必须为空目录。目录被删除后,无法从回收站中恢复,原目录下被删除的文件也彻底从回收站中删除。

<Huawei>dir

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)

---------------------

<Huawei>cd /

<Huawei>rmdir ?

  STRING<1-64>  The total length of absolute path is 64,the length of single

                directory is 15

  flash:        Device name

 

<Huawei>rmdir 023wg.com

Remove directory flash:/023wg.com?[Y/N]:y

%Removing directory flash:/023wg.com...

Error: Directory is not empty.   # 错误 目录不是空目录

 

6、显示文件的内容(more

<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   023wg.com

 

32,004 KB total (31,992 KB free)

 

<Huawei>cd dhcp

<Huawei>dir

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>more dhcp-duid.txt

*Huawei DHCP DUID*

*time* 2016-04-02 11:29:53

*version* 1

#DUID_LL: 000300015489984A66E2

*end*

<Huawei>

 

7、复制文件(copy

不能复制文件夹,只能复制文件到文件下。在拷贝文件前,确保存储器有足够的空间。若目标文件名与已经存在的文件名重名,将提示是否覆盖。

<Huawei>cd dhcp

<Huawei>dir

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>copy dhcp-duid.txt ?

  STRING<1-64>  [drive][path][file name]

  flash:        Device name

 

<Huawei>copy dhcp-duid.txt /

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.

<Huawei>cd  /

<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   023wg.com

    6  -rw-             98  Apr 02 2016 20:02:10   dhcp-duid.txt

 

32,004 KB total (31,991 KB free)

 

8、移动文件(move

<Huawei>cd /src

<Huawei>dir

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)

        

<Huawei>mov /src/patchfile.src ?

  STRING<1-64>  [drive][path][file name]

  flash:        Device name

 

<Huawei>mov /src/patchfile.src flash:?

  flash:                                 

<Huawei>mov /src/patchfile.src flash:

Move flash:/src/patchfile.src to flash:/patchfile.src ?[Y/N]:y

%Moved file flash:/src/patchfile.src 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   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

<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   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)

 

<Huawei>rename dhcp-duid.txt ?

  STRING<1-64>  [drive][path][file name]

  flash:        Device name

 

<Huawei>rename dhcp-duid.txt 1dhcp-duid.txt

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.

<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   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

<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   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)

 

<Huawei>zip /patchfile.src /patchfile.zip

Compress flash:/patchfile.src  to flash:/patchfile.zip?[Y/N]:y

 

100%  complete

%Compressed file flash:/patchfile.src to flash:/patchfile.zip.

<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   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)

 

<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   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)

 

华为交换机系统文件管理配置命令大全(二):http://www.023wg.com/jcpz/343.html

 您阅读这篇文章共花了: 
二维码加载中...
技术交流:欢迎在本文下方留言或加入QQ群:647682417 互相学习。     
本文地址:http://www.023wg.com/jcpz/342.html
版权声明:若无注明,本文皆为“杭州清默网络”原创,转载请保留文章出处。

返回顶部    首页   
版权所有:杭州清默网络    杭州清默网络