⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 quotactl.2

📁 早期freebsd实现
💻 2
字号:
.\" Copyright (c) 1983, 1990, 1991, 1993.\"	The Regents of the University of California.  All rights reserved..\".\" This code is derived from software contributed to Berkeley by.\" Robert Elz at The University of Melbourne..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\"    notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\"    notice, this list of conditions and the following disclaimer in the.\"    documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\"    must display the following acknowledgement:.\"	This product includes software developed by the University of.\"	California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\"    may be used to endorse or promote products derived from this software.\"    without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\"	@(#)quotactl.2	8.1 (Berkeley) 6/4/93.\".Dd June 4, 1993.Dt QUOTACTL 2.Os.Sh NAME.Nm quotactl.Nd manipulate filesystem quotas.Sh SYNOPSIS.Ft #include <ufs/quota.h>	/* for ufs quotas */.Ft int.Fn quotactl "const char *path" "int cmd" "int id" "char *addr".Sh DESCRIPTIONThe.Fn quotactlcall enables, disables andmanipulates filesystem quotas.A quota control commandgiven by.Fa cmdoperates on the given filename.Fa pathfor the given user.Fa id .The address of an optional command specific data structure,.Fa addr ,may be given; its interpretationis discussed below with each command..PpCurrently quotas are supported only for the ``ufs'' filesystem.For ``ufs'',a command is composed of a primary command (see below)and a command type used to interpret the.Fa id .Types are supported for interpretation of user identifiersand group identifiers.The ``ufs'' specific commands are:.Bl -tag -width Q_QUOTAON.It Dv Q_QUOTAONEnable disk quotas for the filesystem specified by.Fa path .The command type specifies the type of the quotas being enabled.The.Fa addrargument specifies a file from which to take the quotas.The quota file must exist;it is normally created with the .Xr quotacheck 8program.The.Fa idargument is unused.Only the super-user may turn quotas on..It Dv Q_QUOTAOFFDisable disk quotas for the filesystem specified by.Fa path .The command type specifies the type of the quotas being disabled.The.Fa addrand.Fa idarguments are unused.Only the super-user may turn quotas off..It Dv Q_GETQUOTAGet disk quota limits and current usage for the user or group(as determined by the command type) with identifier.Fa id ..Fa Addris a pointer to a.Fa struct dqblkstructure (defined in .Ao Pa ufs/quota.h Ac ) ..It Dv Q_SETQUOTASet disk quota limits for the user or group(as determined by the command type) with identifier.Fa id ..Fa Addris a pointer to a.Fa struct dqblkstructure (defined in .Ao Pa ufs/quota.h Ac ) .The usage fields of the.Fa dqblkstructure are ignored.This call is restricted to the super-user..It Dv Q_SETUSESet disk usage limits for the user or group(as determined by the command type) with identifier.Fa id ..Fa Addris a pointer to a.Fa struct dqblkstructure (defined in.Ao Pa ufs/quota.h Ac ) .Only the usage fields are used.This call is restricted to the super-user..It Dv Q_SYNCUpdate the on-disk copy of quota usages.The command type specifies which type of quotas are to be updated.The.Fa idand.Fa addrparameters are ignored..El.Sh RETURN VALUESA successful call returns 0,otherwise the value -1 is returned and the global variable.Va errnoindicates the reason for the failure..Sh ERRORSA.Fn quotactlcall will fail if:.Bl -tag -width ENAMETOOLONGAA.It Bq Er EOPNOTSUPPThe kernel has not been compiled with the.Dv QUOTAoption..It Bq Er EUSERSThe quota table cannot be expanded..It Bq Er EINVAL.Fa Cmdor the command type is invalid..It Bq Er EINVALA pathname contains a character with the high-order bit set..It Bq Er EACCESIn.Dv Q_QUOTAON ,the quota file is not a plain file..It Bq Er EACCESSearch permission is denied for a component of a path prefix..It Bq Er ENOTDIRA component of a path prefix was not a directory..It Bq Er ENAMETOOLONGA component of either pathname exceeded 255 characters,or the entire length of either path name exceeded 1023 characters..It Bq Er ENOENTA filename does not exist..It Bq Er ELOOPToo many symbolic links were encountered in translating a pathname..It Bq Er EROFSIn.Dv Q_QUOTAON ,the quota file resides on a read-only filesystem..It Bq Er EIOAn.Tn I/Oerror occurred while reading from or writingto a file containing quotas..It Bq Er EFAULTAn invalid.Fa addrwas supplied; the associated structure could not be copied in or outof the kernel..It Bq Er EFAULT.Fa Pathpoints outside the process's allocated address space..It Bq Er EPERMThe call was privileged and the caller was not the super-user..El.Sh SEE ALSO.Xr quota 1 ,.Xr fstab 5 ,.Xr edquota 8 ,.Xr quotacheck 8 ,.Xr quotaon 8 ,.Xr repquota 8.Sh BUGSThere should be some way to integrate this call with the resourcelimit interface provided by.Xr setrlimit 2and.Xr getrlimit 2 ..Sh HISTORYThe.Nm quotactlfunction call appeared in.Bx 4.3 Reno .

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -