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.

Certifications & exams

Which exam comes next?

You can already practise for 51 exams, and 16 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications