Bird
0
0

What does the command tail -f /var/log/auth.log do?

medium📝 Command Output Q5 of 15
Linux CLI - System Administration
What does the command tail -f /var/log/auth.log do?
AShows the last lines of auth.log and updates live as new lines are added
BDisplays the entire auth.log file once
CDeletes the last lines of auth.log
DSearches for 'f' in auth.log
Step-by-Step Solution
Solution:
  1. Step 1: Understand tail -f option

    tail -f shows the last part of a file and keeps the output open to show new lines as they are added.
  2. Step 2: Differentiate from other options

    It does not display the entire file once, delete lines, or search for characters.
  3. Final Answer:

    Shows the last lines of auth.log and updates live as new lines are added -> Option A
  4. Quick Check:

    tail -f = live follow last lines [OK]
Quick Trick: Use tail -f to watch logs update live [OK]
Common Mistakes:
  • Thinking tail -f deletes lines
  • Assuming it shows entire file once
  • Confusing tail -f with grep

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes