XK0-005 · Question #753
XK0-005 Question #753: Real Exam Question with Answer & Explanation
The correct answer is A: gzip -c passwords.txt > passwords.txt.gz. The gzip command with the -c flag outputs the compressed data to standard output, which can then be redirected to create a .gz file. This approach maintains the original file while creating a compressed version.
Question
A Linux systems administrator needs to compress a file named passwords.txt. The compressed file should be saved as passwords.txt.gz. Which of the following commands should the administrator use to accomplish this task?
Options
- Agzip -c passwords.txt > passwords.txt.gz
- Bgzip -d passwords.txt | passwords.txt.gz
- Cgzip -n passwords.txt > passwords.txt.gz
- Dgzip -n passwords.txt < passwords.txt.gz
Explanation
The gzip command with the -c flag outputs the compressed data to standard output, which can then be redirected to create a .gz file. This approach maintains the original file while creating a compressed version.
Topics
Community Discussion
No community discussion yet for this question.