WC command details

Source: Internet
Author: User
The wc command of Linux is usually used together with other commands to calculate the line and other information. In Linux, wc is used for counting. The number of lines, characters, and bytes of the returned file. Let's start with an example: Let's look at the above example. There are seven lines in the file getpid_example.c. let's see how to operate the file using the wc command... the wc command of Linux is usually used together with other commands to calculate the line and other information. In Linux, wc is used for counting. The number of lines, characters, and bytes of the returned file.

Let's start with an example:

Take a look at the above example. There are seven lines in the file getpid_example.c to see the effect of operations on the file using the wc command. For example:

Among them, 7 is the number of lines, 15 is the number of words (the maximum number of words in the row, 5th rows), 127 is the number of characters (including line breaks), and getpid_example.c is the file name.

The following shows the wc command parameters, for example:

 

-M corresponds to the number of characters,-l corresponds to the number of rows,-w corresponds to the number of words in the longest row, and-L corresponds to the length of the longest row (in bytes)

 

From the new column

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.