wc: Print newline, word, and byte counts for file

wc is short for word count is a command to count the words and text lines for each argument file.

• Display the line count

# wc -l <filename>

• Display the byte count

# wc -c <filename>

• Display the character count

# wc -m <filename>

• Display the newline count

# wc -l <filename>

• Display the length of longest line

# wc -L <filename>

•Display the word count

# wc -w <filename>

You May Also Like

Leave a Reply?