2 # List quotas of all users in 3 columns :
5 source /etc/alternc/local.sh
7 #checking if quotas are installed
8 command -v /usr/sbin/repquota >/dev/null || { echo "Quotas uninstalled"; exit 0; }
12 if [ "$quotadir" = "/" ] ; then
13 sudo repquota -g -v -n -p "$quotadir" 2>/dev/null || (echo "Error: can't get quota"; exit 1)
15 sudo repquota -g -v -n -p "$quotadir" 2>/dev/null || get_quota "$(dirname $quotadir)"
19 # Some help : this is what we must parse
20 # Block limits File limits
21 #Group used soft hard grace used soft hard grace
22 #----------------------------------------------------------------------
23 #root -- 1612116 0 0 96181 0 0
24 #adm -- 14532 0 0 226 0 0
26 get_quota "$ALTERNC_HTML" | egrep "^\#[0-9]+"|while read gid blank bused bsoft bhard bgrace fused fsoft fhard fgrace ; do
27 echo ${gid/\#/} $bused $bhard