如果在 show 命令中使用 –instance 参数显示详细信息,则输出可能会很长,并且包括多余信息。而在 show 命令中使用 –fields 参数则可以仅显示指定信息。
例如,运行 volume show -instance 可能导致信息分多屏显示。您可以使用 volume show –fields fieldname[,fieldname...] 来自定义输出,以便输出内容除了包含始终会显示的默认字段之外,仅包含指定字段。您可以使用 –fields ? 显示对 show 命令有效的字段。
以下示例说明了 –instance 参数和 –fields 参数之间的输出差异:
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::>