linux view the last few lines of the log

tail -n 50 wx.log

Example: Looking at /var/log/boot.log, only the last line is displayed. then execute

tail -n 1 /var/log/boot.log

 tail -n 1000: show last 1000 lines
 tail -n +1000: start from 1000 lines, display after 1000 lines
 head -n 1000: display the first 1000 lines

Leave a Reply

Your email address will not be published.

en_USEnglish