The user attempts to run the following command on a file called .bigfile that is 495 KB in size: cp bigfile /tmp Will the command execute successfully?

user1 has a disk quota of 0.5 MB. The user attempts to run the following command on a file called
.bigfile that is 495 KB in size:
cp bigfile /tmp
Will the command execute successfully?

user1 has a disk quota of 0.5 MB. The user attempts to run the following command on a file called
.bigfile that is 495 KB in size:
cp bigfile /tmp
Will the command execute successfully?

A.
Yes. Quotas do not include any of the system files such as /tmp /swap.

B.
Yes. The quota is set at the directory level, not the user level.

C.
No. The command will fail because it will cause him to exceed his user quota.

D.
No. A user cannot place files into the /tmp directory.

Explanation:
UFS quotas enable system administrators to control the size of file systems. Quotas
limit the amount of disk space and the number of inodes, which roughly corresponds to the
number of files, that individual users can acquire. For this reason, quotas are especially useful on
the file systems where user home directories reside. As a rule, the public and /tmp file systems
usually do not benefit significantly by establishing quotas.
Note: The cp command copies files and directories.
Reference: System Administration Guide: Advanced Administration, Managing UFS Quotas



Leave a Reply 2

Your email address will not be published. Required fields are marked *

4 × 5 =


rocky

rocky

Agree with pal. [A] is correct:

alice@sol11-ai:~$ ls -lh
total 10251
-rw-r–r– 1 alice staff 4.9M Apr 28 22:14 file
-rw-r–r– 1 alice staff 166 Apr 24 19:01 local.cshrc
-rw-r–r– 1 alice staff 170 Apr 24 19:01 local.login
-rw-r–r– 1 alice staff 131 Apr 24 19:01 local.profile
alice@sol11-ai:~$ dd if=/dev/zero of=file2 count=5000 bs=1024
dd: file2: open: Disc quota exceeded
alice@sol11-ai:~$ dd if=/dev/zero of=/tmp/file2 count=5000 bs=1024
5000+0 records in
5000+0 records out
alice@sol11-ai:~$ ls -l file2
file2: No such file or directory
alice@sol11-ai:~$ ls -l /tmp/file2
-rw-r–r– 1 alice staff 5120000 Apr 28 22:14 /tmp/file2