Code: Select all
$path = "/home/" . ($_SERVER['PHP_AUTH_USER']);
$used = exec("du -c -a $path");
echo $used; Maybe something with repquota /home
Moderator: General Moderators
Code: Select all
$path = "/home/" . ($_SERVER['PHP_AUTH_USER']);
$used = exec("du -c -a $path");
echo $used; Code: Select all
# repquota /home
*** Report for user quotas on device /dev/sda2
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 76 0 0 16 0 0
user1 -- 36400552 62914560 63488000 100 0 0
user2 -- 4 62914560 63488000 1 0 0
user3 -- 43955196 115343360 116367360 573 0 0
user4 -- 4 36700160 36864000 1 0 0
user5 -- 4 36700160 36864000 1 0 0
user6 -- 11724064 115343360 116367360 273 0 0
user7 -- 44976376 115343360 116367360 80 0 0
user8 -- 16223188 62914560 63488000 248 0 0
user9 -- 8073520 36700160 36864000 78 0 0
user10 -- 4878312 36700160 36864000 9 0 0
user11 -- 24 36700160 36864000 7 0 0 Code: Select all
repquota /home | grep user1
user1 -- 36400552 62914560 63488000 100 0 0