View log files under Linux

Source: Internet
Author: User

In the development of the company, the development of the program in the local test is normal, but in the test environment is problematic. The first reaction is to look at the log file and see what the error message is in the log file. I carried out the Vim Log.txt, and then the direct card to die, can not open.

What to do, I still have to check AH. Using the Cat command, although the card is not dead, but the display of the document is obviously wrong, how to do?

Asked the company's predecessors only know, look at the log file, with the tail command, I direct vim open, not to die only strange!

Tail-f Log.txt #显示最后的10行

Tail-n Log.txt #显示最后的100行

View log files under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.