Bird
0
0

You tried to compress a file with gzip -d file.gz but got an error. What is the likely mistake?

medium📝 Debug Q14 of 15
Linux CLI - Archiving and Compression
You tried to compress a file with gzip -d file.gz but got an error. What is the likely mistake?
AYou need to add <code>-z</code> option to decompress
BYou should use <code>gzip file.gz</code> to decompress
CThe file is too large to decompress
DThe file is not compressed or not a gzip file
Step-by-Step Solution
Solution:
  1. Step 1: Understand gzip -d usage

    The -d option decompresses gzip files; it requires a valid gzip file.
  2. Step 2: Identify cause of error

    If the file is not compressed or not a gzip file, decompression fails with error.
  3. Final Answer:

    The file is not compressed or not a gzip file -> Option D
  4. Quick Check:

    gzip -d needs gzip file = D [OK]
Quick Trick: gzip -d only works on gzip compressed files [OK]
Common Mistakes:
  • Using gzip instead of gunzip or gzip -d to decompress
  • Thinking file size blocks decompression
  • Adding wrong options like -z for decompress

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes