Bird
0
0

Which of the following is the correct syntax to create a gzip compressed tar archive named backup.tar.gz from the directory data?

easy📝 Syntax Q3 of 15
Linux CLI - Archiving and Compression
Which of the following is the correct syntax to create a gzip compressed tar archive named backup.tar.gz from the directory data?
Atar -fzcf backup.tar.gz data
Btar -cfz backup.tar.gz data
Ctar -czf backup.tar.gz data
Dtar -zcf backup.tar.gz data
Step-by-Step Solution
Solution:
  1. Step 1: Understand tar options order

    The correct order is -c (create), -z (gzip), -f (file), followed by archive name and source.
  2. Step 2: Check each option sequence

    tar -czf backup.tar.gz data uses -czf which is correct. Others have wrong order or invalid sequences.
  3. Final Answer:

    tar -czf backup.tar.gz data -> Option C
  4. Quick Check:

    Correct tar gzip syntax = tar -czf [OK]
Quick Trick: Use -czf to create gzip tar archive [OK]
Common Mistakes:
  • Mixing option order
  • Placing -f before archive name
  • Using invalid option sequences

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes