quota Command

Purpose

Displays disk usage and quotas.

Syntax

quota [ -uUser ] ] [ -g Group ] ] [ -v | -q ]

Description

The quota command displays disk usage and quotas. By default, or with the -u flag, only user quotas are displayed. The quota command reports the quotas of all file systems listed in the /etc/filesystems file. If the quota command exits with a non-zero status, one or more file systems are over quota.

A root user may use the -u flag with the optional User parameter to view the limits of other users. Users without root user authority can view the limits of groups of which they are members by using the -g flag with the optional Group parameter.
Note:
  1. In a JFS file system, if a particular user has no files in a file system on which that user has a quota, this command displays quota: none for that user. The user's actual quota is displayed when the user has files in the file system, or when the -v flag is specified. For JFS2, a user's actual quota is displayed in all cases.
  2. In JFS2 systems, because the root user is not limited by quotas, limits for the root user are always displayed as zero (unlimited).
  3. The rpc.rquotad protocol does not support the group quota for NFS. Thus, it does not return group quota information for NFS.

Flags

Item Description
-g Displays the quotas of the user's group.
-u Displays user quotas. This flag is the default option.
-v Displays quotas on file systems with no allocated storage.
-q Prints a terse message, containing only information about file systems with usage over quota.
Note: The -q flag takes precedence over the -v flag.

Security

Access Control: This command is owned by the root user and the bin group.

Privilege Control: This program is setuid in order to allow non-privileged users to view personal quotas.

Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To display your quotas as user keith, type:
    quota  
    The system displays the following information:
    User quotas for user keith (uid 502):
    Filesystem  blocks  quota  limit  grace  Files  quota limit grace
            /u      20     55     60            20     60    65
  2. To display quotas as the root user for user davec, type:
    quota -u davec
    The system displays the following information:
    User quotas for user davec (uid 2702):
    Filesystem  blocks  quota  limit  grace  files  quota limit grace
            /u      48     50     60             7     60    60

Files

Item Description
quota.user Specifies user quotas.
quota.group Specifies group quotas.
/etc/filesystems Contains file system names and locations.