linux WC 用法

来源:互联网 发布:淘宝5.6.0下载 编辑:程序博客网 时间:2024/06/05 03:06


wc -c filename:显示一个文件的字节数

wc -m filename:显示一个文件的字符数

wc -l filename:显示一个文件的行数

wc -L filename:显示一个文件中的最长行的长度

wc -w filename:显示一个文件的字数


WC(1)                            User Commands                           WC(1)

NAME
       wc - print newline, word, and byte counts for each file

SYNOPSIS
       wc [OPTION]... [FILE]...
       wc [OPTION]... --files0-from=F

DESCRIPTION
       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.

       -c, --bytes
              print the byte counts

       -m, --chars
              print the character counts

       -l, --lines
              print the newline counts

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

       -L, --max-line-length
              print the length of the longest line

       -w, --words
              print the word counts

       --help display this help and exit

       --version
              output version information and exit

AUTHOR
       Written by Paul Rubin and David MacKenzie.

REPORTING BUGS
       Report wc bugs to bug-coreutils@gnu.org

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

       -L, --max-line-length
              print the length of the longest line

       -w, --words
              print the word counts

       --help display this help and exit

       --version
              output version information and exit

0 0
原创粉丝点击