I have already configured my server to work with user quotas and everything works well. I can modify user quota with the
edquota command. How could I do this programmatically, from a bash script for example?
In the simple form the command is
setquota user blockquota blocklimit inodequota inodelimit filesystem
setquota foo 10G 10G 0 0 /data
to set both the soft quota and hard limit to 10 GB and no inode limit for user
I suppose you could use
quota -u $username to get the current quotas, but I'm not sure how easy that is to parse with a script.