How do I tail a log in Linux?

How do I tail a log in Linux?
Answer
How to Use the Tail Command
  1. Enter the tail command, followed by the file you’d like to view: tail /var/log/auth.log. …
  2. To change the number of lines displayed, use the -n option: tail -n 50 /var/log/auth.log. …
  3. To show a real-time, streaming output of a changing file, use the -f or –follow options: tail -f /var/log/auth.log.
 

Tìm kiếm

Back
Top