Analysis of related usage of quota disk commands in Linux system

Source: Internet
Author: User

Quota

Displays the space and restrictions that the disk has used.

Syntax: Quota [-quvv][user name ...] or quota [-gqvv][group name ...]

Supplemental NOTE: Executes the quota instruction, queries the disk space limits, and learns how much space has been used.

Parameters

-g lists the disk space limits for the group.

-Q Concise list that lists only those parts that exceed the limit.

-U lists the user's disk space limit.

-V Displays the space limits for the user or group in all storage devices that are mounted on the system.

-V Displays version information.

In the work of network management, because the hard disk resource is limited, it is often necessary to set the user's Linux disk quota for the multi-user server. This feature is necessary for a common multi-user server (free or fee-based). Quota is the tool for implementing Linux disk quotas under Redhatlinux.

Cases:

Copy Code

The code is as follows:

[root@linux~]# Quota-guvs #显示目前root的quota限制值

[root@linux~]# Quota-vs-udmtsai #显示dmtsai这个使用者的磁盘配额

Edquota

Edquota (Edit quota)

Function Description: Edit the quota of the user or group.

Syntax: Edquota [-p < Source user name >][-ug][user or group name ...] or Edquota [-ug]-T

Supplemental Note: The Edquota preset uses VI to edit quota settings for the user or group.

Parameters

-U sets the user's quota, which is the preset parameter.

-G sets the quota of the group.

-p< the source user name > apply the quota settings of the source user to other users or groups.

-T sets the grace period.

Cases:

Copy Code

The code is as follows:

[Root@linux ~]# edquota-u zhangy #设定zhangy这个用户的quota限制值

[Root@linux ~]# edquota-p zhangy-u tank #将zhangy的quota限制值 (30MB) copied to tank this user

[Root@linux ~]# edquota-t #修订宽限时间

Quotacheck

Quotacheck command: For scanning mounted file systems and setting disk space and limits

Parameters:

-A scans all partitions

-B Backup

-D Debug Mode

-C re-create files

-F Forced inspection

-I interaction mode

-V Runtime displays detailed processing information

-G Displays the number of directory files that the group occupies

-U Displays the number of directories per user

-M: "Force" to perform a quotacheck scan.

Cases:

Copy Code

The code is as follows:

[Root@linux ~]# Quotacheck-avug #将所有的在/etc/mtab, containing quota supported partition for scanning

QUOTACHECK:SCANNING/DEV/HDB1 [/disk2] Done

Quotacheck:checked 3 Directories and 4 files

[root@linux ~]# quotacheck-avug-m #强制扫描已挂载的filesystem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.