The WC command for Linux

Source: Internet
Author: User

The WC command in Linux is used to count the number of bytes, words, and lines of the specified file and print the statistics.


Syntax: WC [option] [filename]

Multiple files can be connected.


-L: View the number of rows in a file

Wc-l 1.txt 2.txt: Lists the number of rows for two files separately, and calculates the sum of the rows.

-C: Count bytes (bytes).
-W: With a space, the newline character is a split symbol to see a few words in the file.
-M: View the file with a few characters, spaces and line break.

-L: Prints out the longest line length.


The WC command for Linux

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.