But watching the log file continuously when there are so many rapid changes happening in real time is not very helpful. Tail and grepĪlright! So the tail command solves a problem by showing the file changes in real life. ![]() To stop the tailing of the log file, use Ctrl+C terminal shortcut. You can use the -f option to follow the tail of a file, which means that it will keep on showing the new lines added to the file continuously. The tail command is essentially used for showing the lines of a file from the end and hence the term 'tail'. The tail command is so popular for viewing log files in real life that sysadmins use the term 'tail the log file'. Method 1: Watch log files with the tail command How do you see the content of log files in real time? Tail is the most popular command for this purpose but there are some other tools as well. To monitor logs, you need to watch the log file as its content changes. ![]() But log files are dynamic and their content change with time. That's good for files that has static content. You use cat command or probably less command for this purpose.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |