Spring Into Linux

Displays the number of characters, words, and lines in a file.

Format: wc filelist Examples: wc file1 file2

Opt

What It Does

Examples

-c

Show byte count only

wc -c report.txt

-l

Show lines only

wc -l report.txt

-L

Show length of longest line

wc -L report3

-m

Show character count only

wc -m letter

-w

Show word count only

wc -w myfile

    Категории