Tree [80ddf7] master /

File Date Author Commit
 COPYING 2003-10-18 ttate ttate [fd05af] Add COPYING
 ChangeLog 2011-05-22 taca taca [340ff4] Note changes.
 MANIFEST 2003-10-18 ttate ttate [fd05af] Add COPYING
 README 2003-02-13 ttate ttate [ca6dd9] V0 quota format.
 TODO 2011-05-22 taca taca [80ddf7] A simple TODO.
 extconf.rb 2011-04-02 taca taca [8a8848] * check <unistd.h> header.
 quota.c 2011-05-22 taca taca [bffb48] Add support for statvfs(2) with care for Dragon...
 test.rb 2002-11-12 ttate ttate [e08c08] Initial revision

Read Me


This module provides functions which manipulate disk quotas.


  * Linux 2.4.x
  * Solaris 2.6, 7, 8
  * FreeBSD, NetBSD (OpenBSD,.. ?)


Quota.quotaon(dev, quotas)
Quota.getquota(dev, uid)
Quota.setquota(dev, uid, dq)
Quota.setqlim(dev, uid, dq) # *BSD does not have this function.

  * 'dev' is a device file or a mount point (e.g. /dev/hda0, /mnt/foo). On *
    BSD, this library try to find a mounted directory from a given filesystem
    using getmntinfo().
  * 'quotas' is a quotas file.
  * 'uid' is an integer value, an user id or a group id. If it is an integer,
    it is treated as an user id.
  * 'dq' is an entry of the quotas. its members are same as 'dqblk' structure
    (e.g. dqb_curblocks => dq.curblocks). see also the quotactl man pages and
    header files (e.g. linux/quota.h).