wc

wc #

打印 行数/词数/字数/字节数

text
print newline, word, and byte counts for each file

Usage:
    wc [OPTION...] [FILE...]
    wc [OPTION...] --files0-from=F

Options #

text
-c, --bytes
    print the byte counts

-m, --chars
    print the character counts

-w, --words
    print the word counts

-l, --lines
    print the newline counts

-L, --max-line-length
    print the maximum display width

--files0-from=F
    read input from the files specified by NUL-terminated names in file F;
    If F is - then read names from standard input

Example #

bash
wc a.txt
text
# Output (lines words bytes path):
11 22 33 a.txt
2023年12月12日