Disk quotas are enabled on /home. Which command opens a user's soft and hard limits in an editor so you can change them?
LPIC-1 Exam 101-500, objective 104. Devices, Linux filesystems, filesystem hierarchy standard medium
Withdrawn. This question was found to be wrong or misleading and has been retired. It is kept here because answers already given to it still refer to it, and because a withdrawn question is more useful to a reader than a missing page.
How these questions are written — where each question comes from, what the verification ledger records, and what happens when one is found wrong.
The options
Correct edquota -u alice
Correct. edquota opens a temporary file in $EDITOR containing alice's block and inode soft limits, hard limits and current usage; saving it applies the limits.
Not correct quota -u alice
Wrong. quota only displays the quotas and current usage for a user. It is the reporting command, not the editing one.
Not correct repquota /home
Wrong. repquota prints a summary report of quotas and usage for every user on a filesystem. Again reporting, not editing.
Not correct quotacheck -avug
Wrong. quotacheck scans a filesystem and rebuilds the quota accounting files (aquota.user, aquota.group) so recorded usage matches reality. It sets no limits.
Why
The quota workflow: add usrquota and/or grpquota to the fstab options and remount, run quotacheck to build the accounting files, quotaon to enable enforcement, edquota (or setquota, which is non-interactive) to set limits, and quota/repquota to report. Soft limits may be exceeded until the grace period expires; hard limits cannot be exceeded at all.
Where this comes from
- Cited
- LPI exam objective 104.1
Practise this
Reading one question is not practice. The trainer will draw a short set from objective 104 and space the ones you get wrong.
More questions on this objective
- A new disk /dev/sdb has no partition table at all. Which command writes an empty GPT partition table onto it without dropping you into an interactive editor? machine-checked
- You need the partition /dev/sdc1 on a USB stick to carry a FAT32 filesystem so that Windows machines can read and write it. Which command creates it? machine-checked
- You have just run `mkswap /dev/sdb2`. Which command makes the kernel start using that swap area immediately, without a reboot? machine-checked
- Why is it dangerous to run e2fsck against an ext4 filesystem that is currently mounted read-write? machine-checked
- On an ext4 filesystem at /dev/sda1 you want an automatic check to be forced after every 30 mounts. Which command sets that? machine-checked
- `df -h /var` reports the filesystem 100% full, but `du -sh /var` accounts for only about half that space. Nothing is hidden under a mount point. What is the most likely explanation? machine-checked
All questions on Devices, Linux filesystems, filesystem hierarchy standard