Archives and compression · Question 12 of 12
Which commands create a gzip-compressed tar archive of the directory web?
3 answers are correct. Hard Created with AI
Show answer
Answer
- B tar -cf - web | gzip > web.tar.gz
- C tar -czf web.tar.gz web
- D tar czf web.tar.gz web
Explanation
tar also accepts its options without a hyphen, and with -f - it writes to standard output. Without -z (or -a), GNU tar does not compress, even if the name ends in .gz.