fortypoundhead.com

QUOTACTL

Posted On 2007-05-14 by FortyPoundHead
Keywords: Command Reference
Tags: Linux Commandline Linux
Views: 1571


Set disk quotas

SYNTAX
#include

int quotactl(cmd, special, uid, addr)
int cmd;
char *special;
int uid;
caddr_t addr;

DESCRIPTION
The quotactl() call manipulates disk quotas. cmd indi­
cates a command to be applied to UID id or GID id. To set
the type of quota use the QCMD(cmd,type) macro. special
is a pointer to a null-terminated string containing the
path name of the block special device for the file system
being manipulated. addr is the address of an optional,
command specific, data structure which is copied in or out
of the system. The interpretation of addr is given with
each command below.

Q_QUOTAON Turn on quotas for a file system. addr
points to the path name of file containing
the quotas for the file system. The quota
file must exist; it is normally created
with the quotacheck program. This call
is restricted to the super-user.

Q_QUOTAOFF Turn off quotas for a file system. addr
and uid are ignored. This call is
restricted to the super-user.

Q_GETQUOTA Get disk quota limits and current usage for
user or group id. addr is a pointer to a
dqblk structure (defined in
). Only the super-user may
get the quotas of a user other than him­
self.

Q_SETQUOTA Set disk quota limits and current usage for
user or group id. addr is a pointer to a
dqblk structure (defined in
). This call is restricted
to the super-user.

Q_SETQLIM Set disk quota limits for user or group id.
addr is a pointer to a dqblk structure
(defined in ). This call is
restricted to the super-user.

Q_SYNC Update the on-disk copy of quota usages for
a file system. If special is null then all
file systems with active quotas are
sync''ed. addr and uid are ignored.

RETURN VALUES

0 on success.

-1 on failure and sets errno to indicate the error.


About the Author

FortyPoundHead has posted a total of 1974 articles.

 


Comments On This Post

No comments on this post yet!


Do you have a thought relating to this post? You can post your comment here. If you have an unrelated question, you can use the Q&A section to ask it.

Or you can drop a note to the administrators if you're not sure where you should post.


Your IP address is:54.80.247.254

Before you can post, you need to prove you are human. If you log in, this test goes away.



Recent Forum Posts

List of Shady Characters
dwirch posted on April 25, 2017 at about 16:39 in Webmaster Stuff

Job Spammer: Bilal Uddin
dwirch posted on April 25, 2017 at about 11:00 in Spammers

Bug Fix: Contact Form Error
dwirch posted on April 21, 2017 at about 11:38 in Site News

Bug Fix: Ophion Time Tracker
dwirch posted on April 9, 2017 at about 11:30 in Site News

Job Spammer: Yogesh Kapadne
dwirch posted on March 31, 2017 at about 8:04 in Spammers

Job Spammer: Sathya Narayana
dwirch posted on March 15, 2017 at about 7:18 in Spammers