< Back
Page 19 of 19
This chapter is from the book
wc
Used to display the number of lines, words, or characters of data. By default, all three values are displayed:
[student@localhost ~]$ wc sample.txt 2 4 24 sample.txt
Important options include the following:
Option | Description |
---|---|
-c | Only display the number of bytes. (For text data, a byte is one character.) |
-m | Only display the number of characters. |
-l | Only display the number of lines. |
-w | Only display the number of words. |
< Back
Page 19 of 19