Linux Commands: Set disk quotas


quotactl-Linux Command

quotactl command- Set disk quotas

Syntax:
#include <sys/types.h>
#include <sys/quota.h>
int quotactl (int cmd, const char *especial, int id , caddr_t direc);
#include <linux/unistd.h>
_syscall4(int, quotactl, int, cmd, const char *, especial , int, id, caddr_t, direc);  

Description: The system of quotas defines for each user or group a soft limit and a hard limit limiting the amount of disc space that can be used in a system of files given. The hard limit cannot be transferred. The soft limit can be transferred, but it will be let know of it. Item more, the user cannot be over the soft limit beyond one week (predetermined time) every time: after this period the soft limit account like the duro.

The call to the system quotactl manipulates these quotas. Its first argument is of form QCMD (subcmd, type) where type is one of USRQUOTA or GRPQUOTA (for quotas of user and group, respectively), and subcmd is described more down.

The second special argument is the special device of blocks to which these quotas are applied. It must be mounted.

The third argument you go is the identifier of the user or group to who these quotas are applied (when he is excellent).

The fourth argument direc is the direction of a structure of data, following the order.

Subcmd is one of

Q_QUOTAON
It activates the quotas. The argument direc is the way of the file that contains the quotas for the system of files.
Q_QUOTAOFF
It deactivates the quotas.
Q_GETQUOTA
It obtains the limits and the present use of the disc space. The argument direc is a leader to a structure dqblk (defined in <sys/quota.h>).
Q_SETQUOTA
It establishes the limits and the present use; direc is like before.
Q_SETQLIM
It establishes the limits; direc is like before.
Q_SETUSE
It establishes the use.
Q_SYNC
It synchronizes the disc copy of the quotas of a system of files.
Q_GETSTATS
It collects picked up statistical data. 

Example:

Related: quota, getrlimit, quotacheck, quotaon, ulimit

Other Linux Commands:
alias , break , builtin , cal , case , cat , cd , cfdisk , chgrp , chmod , chown , chroot , cksum , cmp , comm , continue , cp , cron , crontab , csplit , cut , date , dc , dd , declare , df , diff , diff3 , dir , dircolors , dirname , dirs , du , echo , egrep , enable , env , eval , exec , expand , export , expr , factor , false , fdformat , fdisk , fgrep , find , fmt , fold , for , fsck , function , getopts , hash , hashcharacter , head , history , hostname , id , if , import , install , join , kill , less , let , ln , local , locate , logname , logout , lpc , lpr , lprm , ls , m4 , man , mbadblocks , mkdir , mkfifo , mknod , more , mount , mtools , mv , nice , nl , nohup , passwd , paste , period , popd , pr , printf , ps , pushd , pwd , quota , quotacheck , quotactl , ram , rcp , read , readonly , return , rm , rmdir , rsync , Run , sdiff , sed , select , seq , set , shift , shopt , shutdown , sleep , sort , split , su , sum , symlink , sync , tac , tail , tar , tee , Test , time , times , top , touch , tr , traceroute , true , tsort , tty , Type , ulimit , umask , uname , Unexpand , uniq , units , unset , unshar , until , useradd , usermod , users , uuencode , watch , wc , whereis , which , while , who , xargs , yes ,
Live2Support.com :
Product - Benefits - Features - How Does it Works - Pricing - SSL Certificates - Signup - Contactus - Login - Submit Resources