![logtail mac logtail mac](https://is5-ssl.mzstatic.com/image/thumb/Purple114/v4/e7/6c/4c/e76c4c15-2ae7-ed87-18a0-71e21d431c8a/source/512x512bb.png)
This command would search the last ten lines of your access log and only display those that contain the IP address 198.51.100.1. Tail can even be combined with other tools like grep to filter the results: tail /var/log/auth.log | grep 198.51.100.1 This will run as a foreground process, so to cancel it, press CTRL+C. For example, you can use this option with /var/log/auth.log (on Debian and Ubuntu systems) to show your access log in real time. This will print the end of the file to your screen, and update it as the file changes. To show a real-time, streaming output of a changing file, use the -f or -follow options: tail -f /var/log/auth.log In this example, the last 50 lines will be shown, but you can modify this number to show as many or as few lines as you need. To change the number of lines displayed, use the -n option: tail -n 50 /var/log/auth.log This will print the last ten lines of the /var/log/auth.log file to your terminal output. When performing administrative tasks on your Linode, tail is one of the most useful tools available.Įnter the tail command, followed by the file you’d like to view: tail /var/log/auth.log It may also be combined with other tools for selective, real-time monitoring.
![logtail mac logtail mac](https://live.staticflickr.com/2850/9631532582_561aa5f4f4_b.jpg)
Using tail is a simple way to show the ends of files, for example, when analyzing logs and other text files that change over time.
#LOGTAIL MAC HOW TO#
In this guide, you’ll learn how to use the tail command.