Bird
0
0

You run the command less -X file.txt but notice the screen does not clear after quitting. What is the cause?

medium📝 Debug Q6 of 15
Linux CLI - Viewing and Editing Files
You run the command less -X file.txt but notice the screen does not clear after quitting. What is the cause?
ALess command is not installed properly
BThe file <code>file.txt</code> is empty
CThe <code>-X</code> option disables clearing the screen on exit
DYou need to press 'q' twice to quit
Step-by-Step Solution
Solution:
  1. Step 1: Understand the -X option in less

    The -X option tells less not to clear the screen after quitting.
  2. Step 2: Analyze the observed behavior

    Since the screen remains as-is after quitting, this matches the effect of -X.
  3. Final Answer:

    The -X option disables clearing the screen on exit -> Option C
  4. Quick Check:

    -X disables screen clearing [OK]
Quick Trick: Use -X to keep screen content after quitting less [OK]
Common Mistakes:
MISTAKES
  • Assuming file emptiness causes this
  • Pressing 'q' multiple times
  • Blaming installation issues
  • Not knowing less options

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes