Skip to content

File information in Linux

wc Word Count

wc <file path>

Prints

[number of lines] [number of words] [bytes] filename

To print only number of lines

wc -l filename

To print only number of words

wc -w filename

To print only bytes

wc -c filename
Info

-c means chracter and in early days one character = one byte but now one charcter != one byte So -c prints bytes not character now

wc -wlc filename