quotacheck command and its examples

This command is used to check and rebuild disk quotas of a file system. Quota is a method used to limit the amount of disk space or number of files by a user or a group.

It scans the specified file system(s) and checks for any inconsistencies or errors in the disk quota information. It then updates the quota files on disk with any modifications.

  • About quotacheck: To scan a filesystem for disk usage, create, check and repair quota files
  • Comes From : quota-3.17
  • Configuration Files: NA
  • Path: /sbin/quotacheck

    Examples:

    1. To scan the file system for a quota

    # quotacheck /
    # quotacheck -u mike

    2. To check for a particular user

    # quotacheck –user mike

    3. To check for a particular group

    # quotacheck -g SUPPORT
    # quotacheck –group SUPPORT

    4. To create new quota files

    # quota -c /
    # quota –create-files /

    5. To create backups of old quota files

    # quotacheck -b /
    # quotacheck –backup /

    6. To forcefully check even if quotas are enabled

    # quotacheck -f /
    # quotacheck –force /

    7. To run in interactive mode

    # quotacheck -i /
    # quotacheck –interactive /

    8. To use the first copy of duplicate structure

    # quotacheck -n /
    # quotacheck –use-first-dquot /

    9. To print the more messages

    # quotacheck -d /
    # quotacheck –debug /

    10. To not to remount the file system read only

    # quotacheck -m /
    # quotacheck –no-remount /

    11. To try remounting filesystem read-only

    # quotacheck -M /
    # quotacheck –try-remount /

    12. To exclude root when checking all filesystems

    # quotacheck -R /
    # quotacheck –exclude-root /

    13. To check quota files of specific format

    # quotacheck -F /
    # quotacheck –format= /

    14. To check all filesystems

    # quotacheck -a
    # quotacheck –all

    15. To get the help for quota

    # quota –help

    16. To get the version

    # quotacheck -V
    # quotacheck –version

    Related Commands: quota, quotactl, fstab, quotaon, repquota, convertquota, setquota, edquota, fsck, efsck, e2fsck, xfsck

    Leave a Reply

    Your email address will not be published. Required fields are marked *