Get the App
SLTechnology News&Howtos  ›  Servers  › 

Related usage of quota disk Command in Linux system

Shulou Source: shulou.com Published: 2022-06-01 10:43:37 10月04日 Update

This article mainly explains "the related usage of quota disk command in Linux system". The content of the explanation in this article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the related usage of quota disk command in Linux system".

Quota

Displays the space and limits used by the disk.

Syntax: quota [- quvV] [user name.] Or quota [- gqvV] [group name.]

Supplementary note: execute the quota instruction to query the disk space limit and know how much space has been used.

Parameters:

-g lists the disk space limits for groups.

-Q concise list, listing only those that exceed the limit.

-u lists the user's disk space limits.

-v shows the space limit of the user or group on all storage devices attached to the system.

-V displays version information.

In the work of network management, because the resources of hard disk are limited, it is often necessary to set the user's linux disk quota for multi-user servers. This feature is even more necessary for public multi-user servers (free or paid). Quota is a tool for implementing linux disk quotas under RedHatlinux.

Example:

The code is as follows:

[root@linux~] # quota-guvs # shows the current quota limit for root

[root@linux~] # quota-vs-udmtsai # shows the disk quota of dmtsai as a user

Edquota

Edquota (edit quota)

Function description: edit the quota of a user or group.

Grammar: edquota [- p] [- ug] [user or group name.] Or edquota [- ug]-t

Additional note: the edquota preset uses vi to edit the quota settings of users or groups.

Parameters:

-u sets the user's quota, which is the default parameter.

-g set the quota of the group.

-p applies the quota settings of the source user to other users or groups.

-t set the grace period.

Example:

The code is as follows:

[root@linux ~] # edquota-u zhangy # sets the quota limit for zhangy as a user

[root@linux ~] # edquota-p zhangy-u tank # copy the quota limit value (30MB) of zhangy to the user tank

[root@linux] # edquota-t # revision grace time

Quotacheck

Quotacheck command: used to scan mounted file systems and set disk space and limits

Parameters:

-a scan all partitions

-b backup

-d debug mode

-c recreate the file

-f forced inspection

-I interaction mode

-v the runtime displays detailed processing information

-g shows the number of directory files occupied by the group

-u displays the number of directories occupied by each user

-M: "force" to scan quotacheck.

Example:

The code is as follows:

[root@linux ~] # quotacheck-avug # scan all partition in / etc/mtab with quota support

Quotacheck: Scanning / dev/hdb1 [/ disk2] done

Quotacheck: Checked 3 directories and 4 files

[root@linux ~] # quotacheck-avug-m # force scanning of mounted filesystem

Thank you for your reading, the above is the content of "related usage of quota disk command in Linux system". After the study of this article, I believe you have a deeper understanding of the relevant usage of quota disk command in Linux system, and the specific usage needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: User disk limit space system command code name quota limit value learning user information content function parameter that is file server mode Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi macOS Xiaomi MySQL Huawei