Bird
0
0

You run grep error /var/log/syslog but get no output, even though you expect errors. What is a likely cause?

medium📝 Debug Q6 of 15
Linux CLI - System Administration
You run grep error /var/log/syslog but get no output, even though you expect errors. What is a likely cause?
Agrep command is not installed
BThe syslog file is empty
CYou need to use sudo to read syslog
DThe search is case-sensitive and errors are capitalized
Step-by-Step Solution
Solution:
  1. Step 1: Check grep case sensitivity

    By default, grep is case-sensitive. Searching for 'error' won't match 'Error' or 'ERROR'.
  2. Step 2: Consider other causes

    While syslog could be empty or require sudo, the most common cause is case mismatch. grep is usually installed on Linux.
  3. Final Answer:

    The search is case-sensitive and errors are capitalized -> Option D
  4. Quick Check:

    grep is case-sensitive by default [OK]
Quick Trick: Use grep -i for case-insensitive search [OK]
Common Mistakes:
  • Ignoring case sensitivity in grep
  • Assuming syslog is always empty
  • Thinking grep might be missing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes