Bird
0
0

What happens to the file size after running gzip -9 file.log compared to gzip -1 file.log?

medium📝 Command Output Q5 of 15
Linux CLI - Archiving and Compression
What happens to the file size after running gzip -9 file.log compared to gzip -1 file.log?
AThe file size increases with -9
BThe file compressed with -9 is smaller than with -1
CBoth produce the same file size
DThe file compressed with -1 is smaller than with -9
Step-by-Step Solution
Solution:
  1. Step 1: Understand gzip compression levels

    -1 is fastest with less compression; -9 is slowest with maximum compression.
  2. Step 2: Effect on file size

    Higher compression level (-9) produces smaller files than lower level (-1).
  3. Final Answer:

    The file compressed with -9 is smaller than with -1 -> Option B
  4. Quick Check:

    Higher gzip level means smaller file = D [OK]
Quick Trick: Use -9 for best compression, smaller files [OK]
Common Mistakes:
  • Assuming faster compression means smaller files
  • Thinking compression level doesn't affect size
  • Believing file size increases with higher level

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes