Skip to main content
本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

使用 Fields 參數限制 ONTAP show 命令的輸出

貢獻者 netapp-sumathi netapp-dbagwell netapp-barbe netapp-aherbin

當您使用 `-instance`參數搭配 `show`命令來顯示詳細資料時,輸出可能會很長,而且會包含比您需要的更多資訊。 `-fields`命令參數 `show`可讓您只顯示指定的資訊。

例如,執行 volume show -instance`可能會導致多個資訊畫面。您可以使用 `volume show -fields fieldname[,fieldname…​]`自訂輸出,使其僅包含指定的欄位(除了永遠顯示的預設欄位之外)。您可以使用 `-fields ?`來顯示命令的有效欄位 `show

下列範例顯示參數與 -fields`參數之間的輸出差異 `-instance

cluster1::> volume show -instance

                                   Vserver Name: cluster1-1
                                    Volume Name: vol0
                                 Aggregate Name: aggr0
                                    Volume Size: 348.3GB
                             Volume Data Set ID: -
                      Volume Master Data Set ID: -
                                   Volume State: online
                                    Volume Type: RW
                                   Volume Style: flex
                                         ...
                          Space Guarantee Style: volume
                      Space Guarantee in Effect: true
                                         ...
Press <space> to page down, <return> for next line, or 'q' to quit...
...
cluster1::>

cluster1::> volume show -fields space-guarantee,space-guarantee-enabled

vserver  volume space-guarantee space-guarantee-enabled
-------- ------ --------------- -----------------------
cluster1-1 vol0   volume          true
cluster1-2 vol0   volume          true
vs1      root_vol
                  volume          true
vs2      new_vol
                  volume          true
vs2      root_vol
                  volume          true
...
cluster1::>