Question | Answer |
Types of limits that an administrator can set limits on the number of files and directories users can create | Hard and Soft limit |
Edit quota options in: | /etc/fstab |
Implements quotas for users (/etc/fstab) | userquota |
implements quotas for group | grpquota |
Create quota files (in directory where the partition is mounted) | aguota.user
aguota.group |
Command to create the aguota.user and aquopta.group files (after placing entries in /etc/fstab) | quotacheck -mavug |
quotacheck Options:Updates the quota database even if other processes are running on the filesystem | -m |
quotacheck Options: Updates the quota database | -a |
quotacheck Options: Verbose mode | -v |
quotacheck Options: Run the database for users and groups | -u and -g |
Enables quotas for the mounted filesystem | quotaon |
Enables all mounted filesystems in /etc/mtab | quotaon -a |
Disable quotas for the mounted filesystem | quotaoff |
Display a summary of disc usage and quotas for the specified filesystem – number of files - used space by user | repquota |
repquota Options: Print all quotas even if there is no usage | repquota -v |
repquota Options: Does not resolve user and group names to speed printing | repquota -n |
repquota Options: Reports for user and group | repquota -u
-g |
repquota Options: Gives info for all filesystems listed in /etc/mtab | repquota -a |
Open and edit a user’s quota, a group quota or change a grace period | edquota |
edquota Options: Change the users quota | edquota -u |
edquota Options: change the groups quota | edquota -g |
edquota Options: change the grace period | edquota -t |
Display the current user’s quota | quota |
quota Options: Show current usage, the hard and soft quota for blocks and inodes | quota -v |
quota Options: Show the quota for a user | quota -u |
quota Options: Show the quota for a group | quota -g |
Change ownership of a file or directory | chown |
Change ownership recursively | chown -R |
Change file ownership only | chown user |
Change user and group ownership | chown user:group |
Change the group ownership only | chown :group |
To change the group ownership for the /hr/personnel file to mgmt – use any of the following to change group ownership of the file to mgmt1 | chgrp mgmt1 /hr/personnel
chown .mgmt1 /hr/personnel
chown :mgmt1 /hr/personnel |
Assign user ownership to bcassini and group ownership to the hr group of the /hr directory and all its sub-directories and files | chown –R bcassini:hr /hr |
To change the owner and group of a file or directory with one command using chown | chown jonadream.users /tmp/schedule.txt |