4 .\" The contents of this file are subject to the terms of the
5 .\" Common Development and Distribution License (the "License").
6 .\" You may not use this file except in compliance with the License.
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or https://opensource.org/licenses/CDDL-1.0.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 .\" If applicable, add the following below this CDDL HEADER, with the
16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
21 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
22 .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
23 .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
24 .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
25 .\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
26 .\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
27 .\" Copyright (c) 2014 Integros [integros.com]
28 .\" Copyright 2019 Richard Laager. All rights reserved.
29 .\" Copyright 2018 Nexenta Systems, Inc.
30 .\" Copyright 2019 Joyent, Inc.
38 .Nd list properties of ZFS datasets
42 .Op Fl r Ns | Ns Fl d Ar depth
44 .Op Fl j Op Ar --json-int
45 .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns … Oc
46 .Oo Fl s Ar property Oc Ns …
47 .Oo Fl S Ar property Oc Ns …
48 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns … Oc
49 .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns …
52 If specified, you can list property information by the absolute pathname or the
54 By default, all file systems and volumes are displayed.
55 Snapshots are displayed if the
66 options are specified.
67 The following fields are displayed:
68 .Sy name , Sy used , Sy available , Sy referenced , Sy mountpoint .
71 Used for scripting mode.
72 Do not print headers and separate fields by a single tab instead of arbitrary
74 .It Fl j , -json Op Ar --json-int
75 Print the output in JSON format.
78 to print the numbers in integer format instead of strings in JSON output.
80 Recursively display any children of the dataset, limiting the recursion to
86 will display only the dataset and its direct children.
88 A comma-separated list of properties to display.
92 One of the properties described in the
101 to display the dataset name
105 to display space usage properties on file systems and volumes.
106 This is a shortcut for specifying
107 .Fl o Ns \ \& Ns Sy name , Ns Sy avail , Ns Sy used , Ns Sy usedsnap , Ns
108 .Sy usedds , Ns Sy usedrefreserv , Ns Sy usedchild
109 .Fl t Sy filesystem , Ns Sy volume .
112 Display numbers in parsable
116 Recursively display any children of the dataset on the command line.
118 A property for sorting the output by column in ascending order based on the
119 value of the property.
120 The property must be one of the properties described in the
126 to sort by the dataset name.
127 Multiple properties can be specified at one time using multiple
132 options are evaluated from left to right in decreasing order of importance.
133 The following is a list of sorting criteria:
136 Numeric types sort in numeric order.
138 String types sort in alphabetical order.
140 Types inappropriate for a row sort that row to the literal bottom, regardless of
141 the specified ordering.
144 If no sorting options are specified the existing behavior of
150 but sorts by property in descending order.
152 A comma-separated list of types to display, where
161 For example, specifying
163 displays only snapshots.
168 can be used as aliases for
176 .\" These are, respectively, examples 5 from zfs.8
177 .\" Make sure to update them bidirectionally
178 .Ss Example 1 : No Listing ZFS Datasets
179 The following command lists all active file systems and volumes in the system.
180 Snapshots are displayed if
181 .Sy listsnaps Ns = Ns Sy on .
186 for more information on pool properties.
187 .Bd -literal -compact -offset Ds
189 NAME USED AVAIL REFER MOUNTPOINT
190 pool 450K 457G 18K /pool
191 pool/home 315K 457G 21K /export/home
192 pool/home/anne 18K 457G 18K /export/home/anne
193 pool/home/bob 276K 457G 276K /export/home/bob
195 .Ss Example 2 : No Listing ZFS filesystems and snapshots in JSON format
196 .Bd -literal -compact -offset Ds
197 .No # Nm zfs Cm list Fl j Fl t Ar filesystem,snapshot | Cm jq
200 "command": "zfs list",
207 "type": "FILESYSTEM",
242 "type": "FILESYSTEM",
267 "value": "/mnt/home",
276 "name": "pool/home/bob",
277 "type": "FILESYSTEM",
302 "value": "/mnt/home/bob",
310 "pool/home/bob@v1": {
311 "name": "pool/home/bob@v1",
314 "dataset": "pool/home/bob",
315 "snapshot_name": "v1",