Linux command--head

Source: Internet
Author: User

  1. Command format:

    head [options] File (option is not writable)

  2. Command function:

    Displays the contents of the number of lines before the beginning of the file

  3. Common functions:

    - g hidden file name

    - v Displays the file name simultaneously

    - n Specifies the number of rows to display, default is 10 rows

    - C Specifies the number of bytes to display

  4. Common examples:

    Example one: Displaying the contents of the first 5 rows of a file

    Command: head-n 5 file or head-5 file


    Example two: Show file first 100 bytes

    Command: head-c file

    Example three: displaying file files except for the entire contents of the next 10 lines

    Command: head-n -10 file

This article is from the "Shiyu" blog, make sure to keep this source http://928004321.blog.51cto.com/10707688/1731235

Linux command--head

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.