Bird
0
0

What does the tar -cvf archive.tar folder/ command do?

easy📝 Conceptual Q11 of 15
Linux CLI - Archiving and Compression
What does the tar -cvf archive.tar folder/ command do?
AExtracts files from archive.tar into the folder directory
BCompresses the folder directory using gzip
CCreates a tar archive named archive.tar containing the folder directory
DLists the contents of archive.tar without extracting
Step-by-Step Solution
Solution:
  1. Step 1: Understand the flags used

    The -c flag means create an archive, -v means verbose (show progress), and -f specifies the archive file name.
  2. Step 2: Analyze the command effect

    The command creates a new archive file named archive.tar containing the contents of the folder/ directory.
  3. Final Answer:

    Creates a tar archive named archive.tar containing the folder directory -> Option C
  4. Quick Check:

    tar -cvf = create archive [OK]
Quick Trick: -c means create archive, -f specifies filename [OK]
Common Mistakes:
  • Confusing -c (create) with -x (extract)
  • Thinking -v compresses files
  • Assuming it extracts files instead of creating

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes