Skip to content

quota MacOS command

The MacOS quota command allows users to manage disk quotas for specific users on a MacOS system. By setting limits on disk usage, administrators can prevent users from consuming excessive storage space and ensure fair distribution of resources. The quota command provides information on current disk usage, limits, and warnings for users, helping to monitor and enforce disk quotas effectively.

quota Syntax:

Terminal window
quota [options] [parameters]

quota Options:

OptionDescription
-vVerbose mode, display detailed information
-gDisplay group quotas
-uDisplay user quotas
-qQuiet mode, display only quota exceeding values
-wWarn when user exceeds soft limits
-cReset quota for specific user or group
-fSpecify a quota file to be used

Parameters:

ParameterDescription
usernameSpecify the username to display quota information for
groupnameSpecify the group name to display quota information for
filesystemSpecify the filesystem or partition to check quotas for

quota Command Usage Examples:

Display Disk Quotas for User A

Terminal window
quota -u A

Shows the disk quotas for user A.

Set Grace Period for User B

Terminal window
quota -t 14days B

Sets a grace period of 14 days for user B.

Display Quotas for All Users

Terminal window
quota -v

Displays disk quotas for all users in a verbose format.

Set Block Limit for User C

Terminal window
quota -b 500M C

Sets a block limit of 500 megabytes for user C.

Clear Quota Limits for User D

Terminal window
quota -x D

Resets the quota limits for user D to unlimited.

How do I use quota in MacOS?

To use the quota command in bash, execute the following command:

Terminal window
quota --user john

How can I check disk quotas for a specific user in MacOS?

To check disk quotas for a specific user, use the following command:

Terminal window
quota --user jane

How to display quotas for all filesystems in MacOS?

To display quotas for all filesystems, use the following command:

Terminal window
quota --all

How to set quotas for a specific user in MacOS?

To set quotas for a specific user, you can use the following command:

Terminal window
quota --user jdoe --limit 500M

How can I see the current quota settings for a filesystem in MacOS?

To view the current quota settings for a filesystem, you can use the following command:

Terminal window
quota --filesystem /mnt/data

How to reset all disk quotas in MacOS?

To reset all disk quotas, you can use the following command:

Terminal window
quota --reset

How to force a filesystem quota recalculation in MacOS?

To force a filesystem quota recalculation, you can use the following command:

Terminal window
quota --recheck /mnt/data

How to display only exceeded quotas in MacOS?

To display only exceeded quotas, you can use the following command:

Terminal window
quota --warn

Applications of the quota command

  • Monitoring and managing user disk usage
  • Enforcing disk space limits for users or groups
  • Setting quotas for file systems
  • Generating reports on disk usage and quotas
  • Implementing disk space management policies