1.\" SPDX-License-Identifier: CDDL-1.0 2.\" 3.\" CDDL HEADER START 4.\" 5.\" The contents of this file are subject to the terms of the 6.\" Common Development and Distribution License (the "License"). 7.\" You may not use this file except in compliance with the License. 8.\" 9.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10.\" or https://opensource.org/licenses/CDDL-1.0. 11.\" See the License for the specific language governing permissions 12.\" and limitations under the License. 13.\" 14.\" When distributing Covered Code, include this CDDL HEADER in each 15.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16.\" If applicable, add the following below this CDDL HEADER, with the 17.\" fields enclosed by brackets "[]" replaced with your own identifying 18.\" information: Portions Copyright [yyyy] [name of copyright owner] 19.\" 20.\" CDDL HEADER END 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. 37.Sh NAME 38.Nm zfs-userspace 39.Nd display space and quotas of ZFS dataset 40.Sh SYNOPSIS 41.Nm zfs 42.Cm userspace 43.Op Fl Hinp 44.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns … Oc 45.Oo Fl s Ar field Oc Ns … 46.Oo Fl S Ar field Oc Ns … 47.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns … Oc 48.Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path 49.Nm zfs 50.Cm groupspace 51.Op Fl Hinp 52.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns … Oc 53.Oo Fl s Ar field Oc Ns … 54.Oo Fl S Ar field Oc Ns … 55.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns … Oc 56.Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path 57.Nm zfs 58.Cm projectspace 59.Op Fl Hp 60.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns … Oc 61.Oo Fl s Ar field Oc Ns … 62.Oo Fl S Ar field Oc Ns … 63.Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path 64. 65.Sh DESCRIPTION 66.Bl -tag -width "" 67.It Xo 68.Nm zfs 69.Cm userspace 70.Op Fl Hinp 71.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns … Oc 72.Oo Fl s Ar field Oc Ns … 73.Oo Fl S Ar field Oc Ns … 74.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns … Oc 75.Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path 76.Xc 77Displays space consumed by, and quotas on, each user in the specified 78filesystem, 79snapshot, or path. 80If a path is given, the filesystem that contains that path will be used. 81This corresponds to the 82.Sy userused@ Ns Em user , 83.Sy userobjused@ Ns Em user , 84.Sy userquota@ Ns Em user , 85and 86.Sy userobjquota@ Ns Em user 87properties. 88.Bl -tag -width "-S field" 89.It Fl H 90Do not print headers, use tab-delimited output. 91.It Fl S Ar field 92Sort by this field in reverse order. 93See 94.Fl s . 95.It Fl i 96Translate SID to POSIX ID. 97The POSIX ID may be ephemeral if no mapping exists. 98Normal POSIX interfaces 99.Pq like Xr stat 2 , Nm ls Fl l 100perform this translation, so the 101.Fl i 102option allows the output from 103.Nm zfs Cm userspace 104to be compared directly with those utilities. 105However, 106.Fl i 107may lead to confusion if some files were created by an SMB user before a 108SMB-to-POSIX name mapping was established. 109In such a case, some files will be owned by the SMB entity and some by the POSIX 110entity. 111However, the 112.Fl i 113option will report that the POSIX entity has the total usage and quota for both. 114.It Fl n 115Print numeric ID instead of user/group name. 116.It Fl o Ar field Ns Oo , Ns Ar field Oc Ns … 117Display only the specified fields from the following set: 118.Sy type , 119.Sy name , 120.Sy used , 121.Sy quota . 122The default is to display all fields. 123.It Fl p 124Use exact 125.Pq parsable 126numeric output. 127.It Fl s Ar field 128Sort output by this field. 129The 130.Fl s 131and 132.Fl S 133flags may be specified multiple times to sort first by one field, then by 134another. 135The default is 136.Fl s Sy type Fl s Sy name . 137.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns … 138Print only the specified types from the following set: 139.Sy all , 140.Sy posixuser , 141.Sy smbuser , 142.Sy posixgroup , 143.Sy smbgroup . 144The default is 145.Fl t Sy posixuser , Ns Sy smbuser . 146The default can be changed to include group types. 147.El 148.It Xo 149.Nm zfs 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 158Displays space consumed by, and quotas on, each group in the specified 159filesystem or snapshot. 160This subcommand is identical to 161.Cm userspace , 162except that the default types to display are 163.Fl t Sy posixgroup , Ns Sy smbgroup . 164.It Xo 165.Nm zfs 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 173Displays space consumed by, and quotas on, each project in the specified 174filesystem or snapshot. 175This subcommand is identical to 176.Cm userspace , 177except that the project identifier is a numeral, not a name. 178So need neither the option 179.Fl i 180for SID to POSIX ID nor 181.Fl n 182for numeric ID, nor 183.Fl t 184for types. 185.El 186. 187.Sh SEE ALSO 188.Xr zfsprops 7 , 189.Xr zfs-set 8 190