]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/contrib/openzfs/man/man8/zfs-userspace.8
OpenZFS: MFV 2.0-rc3-gfc5966
[FreeBSD/FreeBSD.git] / sys / contrib / openzfs / man / man8 / zfs-userspace.8
1 .\"
2 .\" CDDL HEADER START
3 .\"
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.
7 .\"
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or http://www.opensolaris.org/os/licensing.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
12 .\"
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]
18 .\"
19 .\" CDDL HEADER END
20 .\"
21 .\"
22 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
23 .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
24 .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
25 .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
26 .\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
27 .\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
28 .\" Copyright (c) 2014 Integros [integros.com]
29 .\" Copyright 2019 Richard Laager. All rights reserved.
30 .\" Copyright 2018 Nexenta Systems, Inc.
31 .\" Copyright 2019 Joyent, Inc.
32 .\"
33 .Dd June 30, 2019
34 .Dt ZFS-USERSPACE 8
35 .Os
36 .Sh NAME
37 .Nm zfs Ns Pf - Cm userspace
38 .Nd Displays space consumed by, and quotas on, each user or group in the specified filesystem or snapshot.
39 .Sh SYNOPSIS
40 .Nm
41 .Cm userspace
42 .Op Fl Hinp
43 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
44 .Oo Fl s Ar field Oc Ns ...
45 .Oo Fl S Ar field Oc Ns ...
46 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
47 .Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path
48 .Nm
49 .Cm groupspace
50 .Op Fl Hinp
51 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
52 .Oo Fl s Ar field Oc Ns ...
53 .Oo Fl S Ar field Oc Ns ...
54 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
55 .Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path
56 .Nm
57 .Cm projectspace
58 .Op Fl Hp
59 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
60 .Oo Fl s Ar field Oc Ns ...
61 .Oo Fl S Ar field Oc Ns ...
62 .Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path
63 .Sh DESCRIPTION
64 .Bl -tag -width ""
65 .It Xo
66 .Nm
67 .Cm userspace
68 .Op Fl Hinp
69 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
70 .Oo Fl s Ar field Oc Ns ...
71 .Oo Fl S Ar field Oc Ns ...
72 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
73 .Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path
74 .Xc
75 Displays space consumed by, and quotas on, each user in the specified filesystem,
76 snapshot, or path.
77 If a path is given, the filesystem that contains that path will be used.
78 This corresponds to the
79 .Sy userused@ Ns Em user ,
80 .Sy userobjused@ Ns Em user ,
81 .Sy userquota@ Ns Em user,
82 and
83 .Sy userobjquota@ Ns Em user
84 properties.
85 .Bl -tag -width "-H"
86 .It Fl H
87 Do not print headers, use tab-delimited output.
88 .It Fl S Ar field
89 Sort by this field in reverse order.
90 See
91 .Fl s .
92 .It Fl i
93 Translate SID to POSIX ID.
94 The POSIX ID may be ephemeral if no mapping exists.
95 Normal POSIX interfaces
96 .Po for example,
97 .Xr stat 2 ,
98 .Nm ls Fl l
99 .Pc
100 perform this translation, so the
101 .Fl i
102 option allows the output from
103 .Nm zfs Cm userspace
104 to be compared directly with those utilities.
105 However,
106 .Fl i
107 may lead to confusion if some files were created by an SMB user before a
108 SMB-to-POSIX name mapping was established.
109 In such a case, some files will be owned by the SMB entity and some by the POSIX
110 entity.
111 However, the
112 .Fl i
113 option will report that the POSIX entity has the total usage and quota for both.
114 .It Fl n
115 Print numeric ID instead of user/group name.
116 .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
117 Display only the specified fields from the following set:
118 .Sy type ,
119 .Sy name ,
120 .Sy used ,
121 .Sy quota .
122 The default is to display all fields.
123 .It Fl p
124 Use exact
125 .Pq parsable
126 numeric output.
127 .It Fl s Ar field
128 Sort output by this field.
129 The
130 .Fl s
131 and
132 .Fl S
133 flags may be specified multiple times to sort first by one field, then by
134 another.
135 The default is
136 .Fl s Sy type Fl s Sy name .
137 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
138 Print only the specified types from the following set:
139 .Sy all ,
140 .Sy posixuser ,
141 .Sy smbuser ,
142 .Sy posixgroup ,
143 .Sy smbgroup .
144 The default is
145 .Fl t Sy posixuser Ns \&, Ns Sy smbuser .
146 The default can be changed to include group types.
147 .El
148 .It Xo
149 .Nm
150 .Cm groupspace
151 .Op Fl Hinp
152 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
153 .Oo Fl s Ar field Oc Ns ...
154 .Oo Fl S Ar field Oc Ns ...
155 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
156 .Ar filesystem Ns | Ns Ar snapshot
157 .Xc
158 Displays space consumed by, and quotas on, each group in the specified
159 filesystem or snapshot.
160 This subcommand is identical to
161 .Cm userspace ,
162 except that the default types to display are
163 .Fl t Sy posixgroup Ns \&, Ns Sy smbgroup .
164 .It Xo
165 .Nm
166 .Cm projectspace
167 .Op Fl Hp
168 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
169 .Oo Fl s Ar field Oc Ns ...
170 .Oo Fl S Ar field Oc Ns ...
171 .Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path
172 .Xc
173 Displays space consumed by, and quotas on, each project in the specified
174 filesystem or snapshot. This subcommand is identical to
175 .Cm userspace ,
176 except that the project identifier is numeral, not name. So need neither
177 the option
178 .Sy -i
179 for SID to POSIX ID nor
180 .Sy -n
181 for numeric ID, nor
182 .Sy -t
183 for types.
184 .El
185 .Sh SEE ALSO
186 .Xr zfs-set 8 ,
187 .Xr zfsprops 8