Bird
0
0

Which of the following is the correct syntax to continuously monitor the file /var/log/auth.log using tail?

easy📝 Command Output Q12 of 15
Linux CLI - Viewing and Editing Files
Which of the following is the correct syntax to continuously monitor the file /var/log/auth.log using tail?
Atail -n /var/log/auth.log
Btail /var/log/auth.log -f
Ctail -follow /var/log/auth.log
Dtail -f /var/log/auth.log
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct option placement

    The option -f must come immediately after tail before the filename.
  2. Step 2: Verify option correctness

    -f is the correct option to follow the file live; -follow is invalid and -n requires a number.
  3. Final Answer:

    tail -f /var/log/auth.log -> Option D
  4. Quick Check:

    Correct syntax = tail -f /var/log/auth.log [OK]
Quick Trick: Options come before filename; -f not -follow [OK]
Common Mistakes:
  • Placing options after filename
  • Using invalid option -follow
  • Using -n without a number

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes