Linux - (WC|Word Count) command (Line count)

> Operating System - Kernel (Windows, Unix, Linux) > Linux / Unix

1 - About

The wc command prints the number of:

in files

Print newline, word, and byte counts for each FILE, and a total line if more than one FILE is specified. With no FILE, or when FILE is -, read standard input.



wc [OPTION]... [FILE]...

where option can be

  • -c, –bytes: print the byte counts
  • -m, –chars: print the character counts
  • -l, –lines: print the newline counts
  • -L, –max-line-length
  • -w, –words: print the word counts