xref: /freebsd/usr.bin/quota/quota.1 (revision cbb3ec25236ba72f91cbdf23f8b78b9d1af0cedf)
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.\"	from: @(#)quota.1	8.1 (Berkeley) 6/6/93
32.\"
33.Dd February 3, 2007
34.Dt QUOTA 1
35.Os
36.Sh NAME
37.Nm quota
38.Nd display disk usage and limits
39.Sh SYNOPSIS
40.Nm
41.Op Fl ghlu
42.Op Fl f Ar path
43.Op Fl v | q | r
44.Nm
45.Op Fl hlu
46.Op Fl f Ar path
47.Op Fl v | q | r
48.Ar user ...
49.Nm
50.Fl g
51.Op Fl hl
52.Op Fl f Ar path
53.Op Fl v | q | r
54.Ar group ...
55.Sh DESCRIPTION
56The
57.Nm
58utility displays users' disk usage and limits.
59By default only the user quotas are printed.
60Disk block usage and limits are shown in 1024-byte blocks.
61.Pp
62The following options are available:
63.Bl -tag -width indent
64.It Fl f Ar path
65Only display quota information for the file system
66that contains the specified path.
67This can be any file within a mounted file system.
68.It Fl g
69Print group quotas for the group
70of which the user is a member.
71.It Fl h
72"Human-readable" output.
73Use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte.
74.It Fl l
75Do not report quotas on
76.Tn NFS
77file systems.
78.It Fl q
79Print a more terse message,
80containing only information
81on file systems where usage is over quota.
82The
83.Fl q
84flag takes precedence over the
85.Fl v
86flag.
87.It Fl r
88Display the raw quota information as it appears in the quota structure.
89Non-zero time values will also be displayed in
90.Xr ctime 3
91format.
92This option implies
93.Fl v
94and will override the
95.Fl q
96flag.
97.It Fl u
98Print the user quotas.
99This is the default unless
100.Fl g
101is specified.
102.It Fl v
103Display quotas on file systems
104where no storage is allocated.
105.El
106.Pp
107Specifying both
108.Fl g
109and
110.Fl u
111displays both the user quotas and the group quotas (for
112the user).
113.Pp
114Only the super-user may use the
115.Fl u
116flag and the optional
117.Ar user
118argument to view the limits of other users.
119Non-super-users can use the
120.Fl g
121flag and optional
122.Ar group
123argument to view only the limits of groups of which they are members.
124.Pp
125The
126.Nm
127utility tries to report the quotas of all mounted file systems.
128If the file system is mounted via
129.Tn NFS ,
130it will attempt to contact the
131.Xr rpc.rquotad 8
132daemon on the
133.Tn NFS
134server.
135For
136.Tn UFS
137file systems, quotas must be turned on in
138.Pa /etc/fstab .
139If
140.Nm
141exits with a non-zero status, one or more file systems
142are over quota or the path specified with the
143.Fl f
144option does not exist.
145.Pp
146If the
147.Fl l
148flag is specified,
149.Nm
150will not check
151.Tn NFS
152file systems.
153.Sh FILES
154.Bl -tag -width quota.group -compact
155.It Pa quota.user
156located at the file system root with user quotas
157.It Pa quota.group
158located at the file system root with group quotas
159.It Pa /etc/fstab
160to find file system names and locations
161.El
162.Sh SEE ALSO
163.Xr quotactl 2 ,
164.Xr ctime 3 ,
165.Xr fstab 5 ,
166.Xr edquota 8 ,
167.Xr quotacheck 8 ,
168.Xr quotaon 8 ,
169.Xr repquota 8 ,
170.Xr rpc.rquotad 8
171.Sh HISTORY
172The
173.Nm
174command appeared in
175.Bx 4.2 .
176