Exploring wc - Linux Commands

| 2 min read

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

OptionDescription
-c, —bytesPrint the number of bytes in each file
-m, —charsPrint the number of characters in each file (character count may vary by encoding)
-l, —linesPrint the number of lines in each file
-w, —wordsPrint 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!