Bird
0
0

If you run tail -n 5 /var/log/cron | grep alice and get no output, what does it mean?

medium📝 Command Output Q5 of 15
Linux CLI - Cron and Scheduling
If you run tail -n 5 /var/log/cron | grep alice and get no output, what does it mean?
AThe grep command is incorrect
BThe cron log file is empty
CNo cron jobs run by user alice in last 5 log lines
DThe tail command is showing the first 5 lines
Step-by-Step Solution
Solution:
  1. Step 1: Understand command sequence

    tail -n 5 shows last 5 lines of the cron log. grep alice filters lines containing 'alice'.
  2. Step 2: Interpret no output

    No output means none of the last 5 lines mention 'alice'. The file is not necessarily empty.
  3. Final Answer:

    No cron jobs run by user alice in last 5 log lines -> Option C
  4. Quick Check:

    No grep output means no matching lines found [OK]
Quick Trick: No grep output means no matching lines found [OK]
Common Mistakes:
  • Assuming grep or tail commands are wrong
  • Thinking tail shows first lines instead of last
  • Confusing empty output with empty file

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes