The repquota
command is a Linux command that is used to display the current disk usage and quotas for a file system. It provides a report that shows the disk space limit status for users and groups on the file system. This command is useful for system administrators who need to monitor and manage disk space usage on a Linux system.
Overview
The repquota
command is used in the following format:
repquota [options] [filesystem]
The options
parameter specifies any additional options that are passed to the command. The filesystem
parameter specifies the file system that the report is generated for. If no file system is specified, the command defaults to the root file system.
The report generated by repquota
consists of several columns that provide information about the disk usage and quotas for users and groups on the file system. The columns are as follows:
- Quota group: The name of the group that has a quota set.
- Type: The type of quota (either
user
orgroup
). - ID: The ID of the user or group.
- Block Limit: The maximum number of disk blocks that the user or group is allowed to use.
- Block Used: The current number of disk blocks being used by the user or group.
- Block Soft Limit: The soft limit for disk blocks, which is a warning threshold that is set before the hard limit is reached.
- Block Hard Limit: The hard limit for disk blocks, which is the maximum limit that cannot be exceeded.
- Inode Limit: The maximum number of inodes that the user or group is allowed to use.
- Inode Used: The current number of inodes being used by the user or group.
- Inode Soft Limit: The soft limit for inodes, which is a warning threshold that is set before the hard limit is reached.
- Inode Hard Limit: The hard limit for inodes, which is the maximum limit that cannot be exceeded.
- Grace Period: The amount of time remaining before the soft limit is enforced.
Examples
To generate a report for the root file system, simply enter the following command:
repquota /
To generate a report for a specific file system, specify the file system as the parameter:
repquota /home
Options
The following table lists the available options for the repquota
command:
Option | Description |
---|---|
-a |
Display quotas for all file systems |
-g |
Display quotas for groups |
-u |
Display quotas for users |
-s |
Display only a summary of the report |
-v |
Display verbose output |
Troubleshooting Tips
If you receive an error message when running the repquota
command, ensure that you have the necessary permissions to access the file system. The command must be run as root or with sudo privileges.
If the report generated by repquota
is not accurate, check that quotas are enabled on the file system. Quotas can be enabled using the quotacheck
command.
Notes
The repquota
command is a useful tool for monitoring and managing disk space usage on a Linux system. It provides a detailed report that shows the disk space limit status for users and groups on a file system. By using this command, system administrators can identify users or groups that are using excessive disk space and take appropriate action to manage disk usage.