Bird
0
0

What will be the output of the command unzip -l archive.zip if archive.zip contains files file1.txt and file2.txt?

medium📝 Command Output Q4 of 15
Linux CLI - Archiving and Compression
What will be the output of the command unzip -l archive.zip if archive.zip contains files file1.txt and file2.txt?
AExtracts file1.txt and file2.txt to current directory
BLists file1.txt and file2.txt with sizes and dates
CDeletes archive.zip after listing files
DCreates a new archive with file1.txt and file2.txt
Step-by-Step Solution
Solution:
  1. Step 1: Understand unzip -l option

    The -l option lists the contents of the zip archive without extracting.
  2. Step 2: Match output description

    Lists file1.txt and file2.txt with sizes and dates correctly describes listing files with details. Others describe extraction, deletion, or creation which are incorrect.
  3. Final Answer:

    Lists file1.txt and file2.txt with sizes and dates -> Option B
  4. Quick Check:

    unzip -l lists files only [OK]
Quick Trick: Use unzip -l to list archive contents [OK]
Common Mistakes:
  • Thinking -l extracts files
  • Confusing unzip with zip
  • Expecting deletion after listing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes