What is the cat Command in Linux?
The wc
command stands for word count. It is used to count the number of lines, words, and bytes (or characters) in files. This command is commonly used to quickly get statistical information about the contents of text files.
Basic syntax:
wc [option] [file]
Example:
wc file-name
Options
Option | Description |
---|---|
-c, —bytes | Print the number of bytes in each file |
-m, —chars | Print the number of characters in each file (character count may vary by encoding) |
-l, —lines | Print the number of lines in each file |
-w, —words | Print the number of words in each file |
Additional Help
You can explore more by using the commands:
wc --help
# or
man wc
Thank you!
Thank you for your time and for reading this!