Bird
0
0

Why does less use a buffer to display file content instead of reading the entire file at once?

hard📝 Conceptual Q10 of 15
Linux CLI - Viewing and Editing Files
Why does less use a buffer to display file content instead of reading the entire file at once?
ATo improve performance and allow quick navigation in large files
BBecause it cannot read files larger than 1MB
CTo prevent users from editing the file accidentally
DBecause it only supports text files
Step-by-Step Solution
Solution:
  1. Step 1: Understand less buffering behavior

    less reads files in chunks (buffering) to handle large files efficiently without loading all content into memory.
  2. Step 2: Analyze incorrect options

    It can read files larger than 1MB; it is a viewer, not editor; it supports text files but buffering is for performance.
  3. Final Answer:

    To improve performance and allow quick navigation in large files -> Option A
  4. Quick Check:

    Buffering improves performance [OK]
Quick Trick: Buffering helps less handle big files smoothly [OK]
Common Mistakes:
  • Thinking less can't read big files
  • Confusing viewing with editing
  • Assuming buffering limits file type
  • Ignoring performance reasons

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes