CLI Options/Examples

Navigation:  inodes Limits > cl-quota >

CLI Options/Examples

Previous pageReturn to chapter overviewNext page

cl-quotа utility has the following command line options:


-u | --user                  : specifies the user

-U | --user-id              : specifies the user ID

-S | --soft-limit            : sets the soft limit for a user. Pass 0 or 'default' to set package default limit. Pass -1 or 'unlimited' to cancel limit

-H | --hard-limit            : sets the hard limit for a user. Pass 0 or 'default' to set package default limit. Pass -1 or 'unlimited' to cancel limit

-V | --csv                  : returns data as comma separated values

-p | --package              : specifies a package to set or get limits

-P | --package-limits        : prints package limits

-a | --all-package-limits : prints all package limits (including packages without limits)

-Y | --sync                  : synchronizes packages and users limits with the database

-C | --cache-content        : cache quota data to a file the database

-F | --force                : save user quotas even when they are equal to defaults

       --check                : check if quotas is enabled/activated/suported; if disabled show diagnostic information; using with --user or --user-id options


--user and --user-id options are designed to specify user whose limits are required to be set or displayed. --user specifies user name, --user-id - uid. It is acceptable to specify one or another.


--package - specifies package name.


--soft-limit, --hard-limit - specify soft and hard limits values respectively. It is acceptable to use words “default” or “unlimited” as limit value.


--csv - displays limits in csv format (instead of data formatted in the table).


--package-limits - displaying the limits of the packages created by the panel admin.


--all-package-limits - displaying the limits of all the packages, including the ones created by the resellers and packages with no users.


--sync - synchronizes users quotas and packages with the database.


--cache-contents - performs quotas caching.


--force - saving user quotas even if they are equal to the current.


--check - performs diagnostics for a specified user. Can be used only when a user is specified (along with --user / --user-id).




1. Reading current user limits:


# cl-quota

# cl-quota --csv


2. Reading current package limits:


# cl-quota --package-limits

# cl-quota --all-package-limits

# cl-quota --package-limits --csv

# cl-quota --all-package-limits --csv


3. Specifying limits for a user:


# cl-quota --user-id=500 --soft-limit=0 --hard-limit=0

# cl-quota --user-id=500 --soft-limit=unlimited

# cl-quota --user-id=500 --soft-limit=0 --hard-limit=-1

# cl-quota --user-id=958 --hard-limit=20000 --soft-limit=0 --force


4. Specifying limits for a package:


# cl-quota --package pack1 --hard-limit=-1 --soft-limit=5000

# cl-quota --package pack1 --hard-limit=10000

# cl-quota --package pack1 --soft-limit=default


5. User diagnostics (with example output):


# cl-quota --user-id=500 --check

Quota disabled for user id 500 (home directory /home/cltest1); quotaon: Mountpoint (or device) / not found or has no quota enabled.


6. Synchronizing quotas with caching (executed in cron):


# cl-quota -YC