*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Linux man pages -> quotactl (2)              
Title
Content
Arch
Section
 

QUOTACTL(2)

Contents


NAME    [Toc]    [Back]

       quotactl - manipulate disk quotas

SYNOPSIS    [Toc]    [Back]

       #include <sys/types.h>
       #include <sys/quota.h>

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

       #include <linux/unistd.h>

       _syscall4(int,  quotactl,  int,	cmd,  const char *, special , int, id,
       caddr_t, addr);

DESCRIPTION    [Toc]    [Back]

       The quota system defines for each user and/or group a soft limit and  a
       hard  limit  bounding  the  amount  of disk space that can be used on a
       given file system.  The hard limit cannot be crossed.  The  soft  limit
       can  be	crossed, but warnings will ensue. Moreover, the user cannot be
       above the soft limit for more than one week (by	default)  at  a  time:
       after this week the soft limit counts as hard limit.

       The quotactl system call manipulates these quota. Its first argument is
       of the form QCMD(subcmd,type) where type is either USRQUOTA or GRPQUOTA
       (for user quota and group quota, respectively), and subcmd is described
       below.

       The second argument special is the block  special  device  these  quota
       apply to.  It must be mounted.

       The  third  argument  id  is  the user or group id these quota apply to
       (when relevant).

       The fourth argument addr is the address of a data structure,  depending
       on the command.

       The subcmd is one of

       Q_QUOTAON  Enable quotas. The addr argument is the pathname of the file
		  containing the quotas for the filesystem.

       Q_QUOTAOFF Disable quotas.

       Q_GETQUOTA Get limits and current usage of disk space. The  addr  argument
	 is  a	pointer  to  a	dqblk  structure  (defined  in
		  <sys/quota.h>).

       Q_SETQUOTA Set limits and current usage; addr is as before.

       Q_SETQLIM  Set limits; addr is as before.

       Q_SETUSE   Set usage.

       Q_SYNC	  Sync disk copy of a filesystems quotas.

       Q_GETSTATS Get collected stats.

RETURN VALUE    [Toc]    [Back]

       On success, quotactl returns 0. On error, -1 is returned, and errno  is
       set appropriately.

ERRORS    [Toc]    [Back]

       ENOPKG	The kernel was compiled without quota support.

       EFAULT	Bad addr value.

       EINVAL	type  is  not  a  known  quota	type. Or, special could not be
		found.

       ENOTBLK	special is not a block special device.

       ENODEV	special cannot be found in the mount table.

       EACCES	The quota file is not an ordinary file.

       EIO	Cannot read or write the quota file.

       EMFILE	Too many open files: cannot open quota file.

       EBUSY	Q_QUOTAON was asked, but quota were enabled already.

       ESRCH	Q_GETQUOTA or Q_SETQUOTA or Q_SETUSE or  Q_SETQLIM  was  asked
		for a file system that didn't have quota enabled.

       EPERM	The process was not root (for the file system), and Q_GETQUOTA
		was asked for another id than that of the process  itself,  or
		anything other than Q_GETSTATS or Q_SYNC was asked.

CONFORMING TO    [Toc]    [Back]

       BSD

SEE ALSO    [Toc]    [Back]

      
      
       quota(1),  getrlimit(2),  setrlimit(2),	ulimit(2), quotacheck(8), quo-
       taon(8)



Linux 1.3.88			  1996-04-14			   QUOTACTL(2)
[ Back ]
 Similar pages
Name OS Title
quota HP-UX disk quotas
edquota HP-UX edit user disk quotas
quotactl NetBSD manipulate filesystem quotas
quotactl OpenBSD manipulate filesystem quotas
quotactl FreeBSD manipulate file system quotas
VFS_QUOTACTL FreeBSD manipulate file system quotas
edquota Tru64 Edits quotas.
disklabel Tru64 Reads and writes a disk pack label and formats disk partitions
edquota FreeBSD edit user quotas
quotaon OpenBSD turn filesystem quotas on and off
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service