Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Related usage of quota disk Command in Linux system

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report