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