Bird
0
0

You run grep CRON /var/log/cron | tail -5 but get no output, even though you know cron jobs ran recently. What is the most likely reason?

medium📝 Troubleshoot Q14 of 15
Linux CLI - Cron and Scheduling
You run grep CRON /var/log/cron | tail -5 but get no output, even though you know cron jobs ran recently. What is the most likely reason?
ACron jobs do not write to /var/log/cron
BThe grep command syntax is incorrect
CThe tail command does not work with pipes
DThe cron log file is empty or missing
Step-by-Step Solution
Solution:
  1. Step 1: Check command correctness

    The command syntax is correct; grep filters lines with 'CRON', tail shows last 5 lines.
  2. Step 2: Consider log file state

    If no output appears, the log file may be empty or missing, so no lines match.
  3. Final Answer:

    The cron log file is empty or missing -> Option D
  4. Quick Check:

    No output usually means empty or missing file [OK]
Quick Trick: No output often means empty or missing log file [OK]
Common Mistakes:
  • Blaming grep syntax when it is correct
  • Assuming tail can't work with pipes
  • Thinking cron never logs to /var/log/cron

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes