Head commands in linux

Source: Internet
Author: User
In linux, the head command is used to view the content of the first few lines of a specific file. the specific format is as follows: head & lt; filename & gt ;: you can use the head command to view the first few lines of content in a specific file. This command is the first 10 lines of content by default. if you want to view more information, you can...
In linux, the head command is used to view the content of the first few lines of a specific file. the specific format is as follows: head : You can use the head command to view the first few lines of content in a specific file. This command is the first 10 lines of content by default. if you want to view more information, you can set it using a number option, such as head-20 install. you can view the install. the first 20 lines of log files are the opposite of the head command. the tail command is used to view the content of the last few lines of a specific file. by default, it is used to view the content of the last 10 lines of the file, similarly, if you want to view more information, you can also set it using the number option, for example, www.2cto.com tail-20 install. you can also use tail to observe the log file update process. With the-f option, tail automatically displays new messages in the open file to the screen in real time. For example, to observe changes in/var/log/messages in real time, enter the following command as the root user at the shell prompt: tail-f/var/log/messages author gzh0222

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.