XK0-005 · Question #294
XK0-005 Question #294: Real Exam Question with Answer & Explanation
The correct answer is A: tar -zcvf backup.tar.gz /employee. To back up and compress files using tar, the correct command combines options for creation, verbosity, compression, and specifying the archive file and source directory.
Question
A directory called /employee is shared with many employees in a company. New hardware was acquired, and the systems administrator needs to back up all files in /employee before the server is replaced. Which of the following commands should be used to back up all the files and compress them to use little space in the filesystem?
Options
- Atar -zcvf backup.tar.gz /employee
- Btar -zxvf backup.tar.gz /employee
- Dtar -Tpf backup.tar.gz /employee
Explanation
To back up and compress files using tar, the correct command combines options for creation, verbosity, compression, and specifying the archive file and source directory.
Common mistakes.
- B. The
-xoption is used to extract files from an archive, not to create one. - D. The
-Toption is used to read file names to be archived from a file, and-ppreserves permissions, but it lacks the-c(create) and-z(compress) options needed for the stated goal.
Concept tested. Tar archive creation with gzip compression
Topics
Community Discussion
No community discussion yet for this question.