Bird
0
0

You want to monitor a log file that is frequently rotated. Which command ensures continuous monitoring even after rotation?

hard📝 Application Q9 of 15
Linux CLI - Viewing and Editing Files
You want to monitor a log file that is frequently rotated. Which command ensures continuous monitoring even after rotation?
Atail --follow=name /var/log/app.log
Btail -f /var/log/app.log
Ctail -F /var/log/app.log
Dtail --retry /var/log/app.log
Step-by-Step Solution
Solution:
  1. Step 1: Understand difference between -f and -F

    -F follows the file by name and retries if the file is replaced (rotated).
  2. Step 2: Check other options

    --follow=name is similar but -F is shorthand; --retry alone does not follow.
  3. Final Answer:

    tail -F /var/log/app.log -> Option C
  4. Quick Check:

    Use -F to handle rotated files automatically [OK]
Quick Trick: Use tail -F for logs that rotate often [OK]
Common Mistakes:
  • Using -f which breaks on rotation
  • Confusing --retry as follow option
  • Not knowing -F exists

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes