Backup

You wish to restore the file memo.ben which was backed up in the
tarfile MyBackup.tar. What command should you type?

Answer: tar xf MyBackup.tar memo.ben
This command uses the x switch to extract a file. Here the file
memo.ben will be restored from the tarfile MyBackup.tar.

You need to view the contents of the tarfile called MyBackup.tar.
What command would you use?

Answer: tar tf MyBackup.tar
The t switch tells tar to display the contents and the f modifier
specifies which file to examine.

You routinely compress old log files. You now need to examine a log
from two months ago. In order to view its contents without first
having to decompress it, use the _________ utility.

Answer: zcat
The zcat utility allows you to examine the contents of a compressed
file much the same way that cat displays a file.



You want to know how much space is being occupied by your user’s home directories. Which of the following will provide you with this information?
Choose one:
a. du -l /home
b. du -b /home
c. du -m /home
d. du -c /home
Answer: d
Using the -c option with the du command will show the grand total of used space for the designated directory.



What command would you type to use the cpio to create a backup called backup.cpio of all the users’ home directories?
Answer: find /home | cpio -o > backup.cpio
The find command is used to create a list of the files and directories contained in home. This list is then piped to the cpio utility as a list of files to include and the output is saved to a file called backup.cpio.





Comments

Popular posts from this blog

RPM

RAID

Wild Cards