Bird
0
0

You run gzip file.txt but get an error saying 'file.txt already compressed'. What is the likely cause?

medium📝 Debug Q6 of 15
Linux CLI - Archiving and Compression
You run gzip file.txt but get an error saying 'file.txt already compressed'. What is the likely cause?
AYou do not have permission to compress the file
BThe file is too large to compress
CThe file already has a .gz extension and is compressed
Dgzip command is not installed
Step-by-Step Solution
Solution:
  1. Step 1: Analyze error message

    'file.txt already compressed' means gzip detects the file is compressed.
  2. Step 2: Common cause

    Usually the file has a .gz extension or gzip header, so gzip refuses to compress again.
  3. Final Answer:

    The file already has a .gz extension and is compressed -> Option C
  4. Quick Check:

    gzip error means file already compressed = A [OK]
Quick Trick: Check file extension before compressing again [OK]
Common Mistakes:
  • Assuming file size causes error
  • Blaming permissions without checking file
  • Thinking gzip is missing without verifying

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes