Bird
0
0

Which of the following is the correct syntax to create a zip archive named archive.zip including all files in the folder docs recursively?

easy📝 Syntax Q12 of 15
Linux CLI - Archiving and Compression
Which of the following is the correct syntax to create a zip archive named archive.zip including all files in the folder docs recursively?
Azip -r archive.zip docs
Bzip -x archive.zip docs
Cunzip -r archive.zip docs
Dzip archive.zip docs
Step-by-Step Solution
Solution:
  1. Step 1: Identify the option for recursive zip

    The -r option tells zip to include folders and their contents recursively.
  2. Step 2: Check command correctness

    zip -r archive.zip docs correctly creates the archive including all files inside docs. Other options are incorrect or for unzip.
  3. Final Answer:

    zip -r archive.zip docs -> Option A
  4. Quick Check:

    Use -r to zip folders recursively [OK]
Quick Trick: Use -r option with zip to include folders recursively [OK]
Common Mistakes:
  • Using unzip instead of zip to create archive
  • Forgetting -r to include folders
  • Using -x which excludes files

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes