跳转到主内容

ONTAP命令行界面是否可以列出CIFS共享或卷中的文件?

Views:
11
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
nas
Last Updated:

适用场景

  • ONTAP 9
  • CIFS/SMB

问题解答

  • 、ONTAP命令行界面没有用于列出此时特定命令CIFS共享内容的命令、但可以使用以下:

1.确定有问题的共享以获取路径:

::> vserver cifs share show SQLBKUP$ -fields volume,path
vserver share-name path volume
---------- ---------- --------------------- ------------
svm SQLBKUP$ /cifs_data/SQLBKUP cifs_data

2.在file-directory show中使用带有通配符(*)的路径:

::> vserver security file-directory show -vserver svm -path /cifs_data/SQLBKUP/* -fields path
vserver path
---------- ----------------------------
svm /cifs_data/SQLBKUP/SQL8
svm /cifs_data/SQLBKUP/SQL8/master
svm /cifs_data/SQLBKUP/SQL8/master/master_db_202412270000.BAK
svm "/cifs_data/SQLBKUP/SQL8/master/yesterday 202412280000.BAK"
...
svm /cifs_data/SQLBKUP/SQL8/model
svm /cifs_data/SQLBKUP/SQL8/model/model_db_202412270000.BAK
svm "/cifs_data/SQLBKUP/SQL8/model/some space 202412280000.BAK"

注意:包含空格的文件名显示时带有引号 ""

  • 对于卷 、接合路径是起点:
  1.  确定接合路径:

::> volume show nfs_data -fields junction-path
vserver volume junction-path
---------- --------- -------------
svm nfs_data /nfs_data

  1. 在file-directory show中使用带有通配符(*)的路径:

::> vserver security file-directory show -vserver svm -path /nfs_data/* -fields path
vserver path
---------- --------------------
svm /nfs_data/AnyVM
svm /nfs_data/AnyVM/AnyVM-4d69cc64.hlog
svm /nfs_data/AnyVM/vmware-36.log
svm /nfs_data/AnyVM/vmware-35.log
svm /nfs_data/AnyVM/vmware-34.log
svm /nfs_data/AnyVM/vmware-33.log
svm /nfs_data/AnyVM/vmware-32.log
svm /nfs_data/AnyVM/vmware.log
svm /nfs_data/AnyVM/AnyVM-aux.xml
svm /nfs_data/AnyVM/AnyVM_1-flat.vmdk
svm /nfs_data/AnyVM/.lck-6c00e88e00000000
svm /nfs_data/AnyVM/AnyVM.vmx

 

追加信息

  • System Manager 9.8及更高版本(ONTAP文件系统分析) 允许通过" 卷">"卷名称">"文件系统">" 资源管理器"列出内容
  • 如果在数据迁移后需要比较文件夹/目录内容、则 NetApp XCP 可能更适合。

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.