How to set Linux crontab time
April 25, 2023
The most commonly used command to view log files on a Linux server is tail.
The ‘tail’ command allows you to view a desired number of lines from the end of a log file, and can also display real-time logs. It is a commonly used command when viewing logs.
You can specify the desired number of lines using the ‘-n’ option. tail -n [number of lines][logfile path]
tail -n 500 filename.log
This will display the last 500 lines of the ‘filename.log’ file.
You can use the -f option.
tail -f filename.log
This will show real-time log in ‘filename.log’ file.