VERIFIED COMMAND LINE QUESTION SET
AND SOLUTIONS
◉ Use:
tar -zcf /salesbkp.tar.gz /sales.
Answer: You need to send a backup copy of the /etc directory across
the network.
Your task in this lab is to:
-Create a compressed archive of the /sales directory and all it's
contents.
-Save the file in the root directory (/) with the name /salesbkp.tar.gz
◉ Use:
tar -xzf /proj_files.tar.gz -C /projects.
Answer: An employee in another department recently provided
several important files for your current assignment. The files are
compressed in a tar file. Today you need to extract each file and
begin to use the files.
,Your task in this lab is to extract the files in /proj_files.tar.gz into the
/projects directory.
◉ Use:
sudo quota -u username command to find quota for a user
18432
20480
500
550.
Answer: Use the quota command to review the quota information
for the wadams user account. Answer the following questions:
What is the blocks quota?
What is the blocks limit?
What is the files quota?
,What is the files limit?
◉ Use: requota -a
root
10240
9216
20480
wadams.
Answer: Use repquota -a to answer the following questions:
Which user does not have a quota limit?
What is the hard block limit for most users?
What is the soft block limit for most users?
What is the highest set hard block limit?
Which user has the highest set hard block limit?
◉ Use: quotaon /.
, Answer: To prevent the users from using too much disk space, you
have implemented hard and soft quotas on the root directory (/).
Today you noticed that the quotas are turned off.
Your task in this lab is to re-enable quotas for the root directory (/).
◉ Use: quotaoff /.
Answer: The system is running hard disk quotas for users and
groups.
Your task in this lab is to disable the quotas on the root directory (/).
◉ Use:
-edquota -u schan
-Press i to edit
-Move cursor to the space below the first soft and insert 1048576
-Do the same for the first hard
-Press Esc
-Type :wq to save and exit.
Answer: Sam Chan (schan) has reached his user quota limit. Rather
than delete some of his files, he wants more space. Your manager has
approved an increase in his quota limit.