8
quotas = quota.get(quota.USER, user)
10
for key in quotas.keys():
12
print item.special + ":"
13
print " inodes (usage, soft limit, hard limit, grace period) = ",
14
print item.inode_usage, item.inode_soft,
15
print item.inode_hard, item.inode_grace
16
print " blocks (usage, soft limit, hard limit, grace period) = ",
17
print item.block_usage, item.block_soft,
18
print item.block_hard, item.block_grace
21
item.inode_soft = 102400
22
item.inode_hard = 204800
23
item.inode_grace = 300
24
item.block_soft = 102400
25
item.block_hard = 204800
26
item.block_grace = 300
28
print("Manipulating quota structure (before):")
30
print("Manipulating quota structure (after):")
33
print("Before setting quota:")
34
os.system("quota -v -u " + user);
36
print("After setting quota:")
37
os.system("quota -v -u " + user);
39
print("After resetting quota:")
40
os.system("quota -v -u " + user);