xref: /freebsd/usr.bin/quota/quota.1 (revision 783d3ff6d7fae619db8a7990b8a6387de0c677b5)
1.\" Copyright (c) 1983, 1990, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Robert Elz at The University of Melbourne.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. Neither the name of the University nor the names of its contributors
16.\"    may be used to endorse or promote products derived from this software
17.\"    without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.Dd February 3, 2007
32.Dt QUOTA 1
33.Os
34.Sh NAME
35.Nm quota
36.Nd display disk usage and limits
37.Sh SYNOPSIS
38.Nm
39.Op Fl ghlu
40.Op Fl f Ar path
41.Op Fl v | q | r
42.Nm
43.Op Fl hlu
44.Op Fl f Ar path
45.Op Fl v | q | r
46.Ar user ...
47.Nm
48.Fl g
49.Op Fl hl
50.Op Fl f Ar path
51.Op Fl v | q | r
52.Ar group ...
53.Sh DESCRIPTION
54The
55.Nm
56utility displays users' disk usage and limits.
57By default only the user quotas are printed.
58Disk block usage and limits are shown in 1024-byte blocks.
59.Pp
60The following options are available:
61.Bl -tag -width indent
62.It Fl f Ar path
63Only display quota information for the file system
64that contains the specified path.
65This can be any file within a mounted file system.
66.It Fl g
67Print group quotas for the group
68of which the user is a member.
69.It Fl h
70"Human-readable" output.
71Use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte.
72.It Fl l
73Do not report quotas on
74.Tn NFS
75file systems.
76.It Fl q
77Print a more terse message,
78containing only information
79on file systems where usage is over quota.
80The
81.Fl q
82flag takes precedence over the
83.Fl v
84flag.
85.It Fl r
86Display the raw quota information as it appears in the quota structure.
87Non-zero time values will also be displayed in
88.Xr ctime 3
89format.
90This option implies
91.Fl v
92and will override the
93.Fl q
94flag.
95.It Fl u
96Print the user quotas.
97This is the default unless
98.Fl g
99is specified.
100.It Fl v
101Display quotas on file systems
102where no storage is allocated.
103.El
104.Pp
105Specifying both
106.Fl g
107and
108.Fl u
109displays both the user quotas and the group quotas (for
110the user).
111.Pp
112Only the super-user may use the
113.Fl u
114flag and the optional
115.Ar user
116argument to view the limits of other users.
117Non-super-users can use the
118.Fl g
119flag and optional
120.Ar group
121argument to view only the limits of groups of which they are members.
122.Pp
123The
124.Nm
125utility tries to report the quotas of all mounted file systems.
126If the file system is mounted via
127.Tn NFS ,
128it will attempt to contact the
129.Xr rpc.rquotad 8
130daemon on the
131.Tn NFS
132server.
133For
134.Tn UFS
135file systems, quotas must be turned on in
136.Pa /etc/fstab .
137If
138.Nm
139exits with a non-zero status, one or more file systems
140are over quota or the path specified with the
141.Fl f
142option does not exist.
143.Pp
144If the
145.Fl l
146flag is specified,
147.Nm
148will not check
149.Tn NFS
150file systems.
151.Sh FILES
152.Bl -tag -width quota.group -compact
153.It Pa quota.user
154located at the file system root with user quotas
155.It Pa quota.group
156located at the file system root with group quotas
157.It Pa /etc/fstab
158to find file system names and locations
159.El
160.Sh SEE ALSO
161.Xr quotactl 2 ,
162.Xr ctime 3 ,
163.Xr fstab 5 ,
164.Xr edquota 8 ,
165.Xr quotacheck 8 ,
166.Xr quotaon 8 ,
167.Xr repquota 8 ,
168.Xr rpc.rquotad 8
169.Sh HISTORY
170The
171.Nm
172command appeared in
173.Bx 4.2 .
174