---
name: "Q_GETQUOTA"
section: "2const"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/Q_GETQUOTA"
---

# Q\_GETQUOTA(2const)

get disk quota limits and current usage for user or group

## NAME

Q\_GETQUOTA - get disk quota limits and current usage for user or group

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

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

**int quotactl(QCMD(Q\_GETQUOTA,** *type***), const char \*\_Nullable** *special***,**              **int** *id***, caddr\_t** *addr***);**

**#include \<sys/quota.h\>**    /\* Definition of **Q\_\*** constants \*/ **#include \<sys/syscall.h\>**  /\* Definition of **SYS\_\*** constants \*/ **#include \<unistd.h\>**

**int syscall(SYS\_quotactl\_fd, int** *fd***, QCMD(Q\_GETQUOTA,** *type***),**             **int** *id***, struct dqblk \****addr***);**

## DESCRIPTION

Get disk quota limits and current usage for user or group *id*.

The *addr* argument is a pointer to a [**dqblk**(2type)](/dqblk/2type.md) structure.

Currently, the kernel fills in all entries of the [**dqblk**(2type)](/dqblk/2type.md) structure and marks them as valid in the *.dqb\_valid* field.

Unprivileged users may retrieve only their own quotas; a privileged user (**CAP\_SYS\_ADMIN**) can retrieve the quotas of any user.

## RETURN VALUE

See [**quotactl**(2)](/quotactl/2.md).

## ERRORS

See [**quotactl**(2)](/quotactl/2.md).

## STANDARDS

Linux.

## HISTORY

Linux.

## SEE ALSO

[**quotactl**(2)](/quotactl/2.md), [**quotactl\_fd**(2)](/quotactl_fd/2.md), [**Q\_GETNEXTQUOTA**(2const)](/Q_GETNEXTQUOTA/2const.md), [**dqblk**(2type)](/dqblk/2type.md)
