Bird
0
0

After running gzip file.txt, you notice file.txt.gz is created but file.txt still exists. What might be the cause?

medium📝 Debug Q7 of 15
Linux CLI - Archiving and Compression
After running gzip file.txt, you notice file.txt.gz is created but file.txt still exists. What might be the cause?
Agzip failed to compress the file
BYou used the -k option to keep the original file
CThe file was already compressed
DYou ran gunzip instead of gzip
Step-by-Step Solution
Solution:
  1. Step 1: Understand gzip default behavior

    By default, gzip deletes the original file after compression.
  2. Step 2: Recognize -k option effect

    If -k was used, gzip keeps the original file.
  3. Final Answer:

    You used the -k option to keep the original file -> Option B
  4. Quick Check:

    Original file kept means -k used = A [OK]
Quick Trick: -k keeps original file after compression [OK]
Common Mistakes:
  • Assuming gzip failed
  • Confusing gzip with gunzip
  • Thinking file was already compressed

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes