![]() -L, -max-line-length - Print the length of the longest line. ![]() ![]() -c, -bytes - Print the number of bytes.-m, -chars - Print the number of characters.-w, -words - Print the number of words.-l, -lines - Print the number of lines.The options below allow you to select which counts are printed. The command will give you information about each file and a line including total statistics: 448 3632 22226 /proc/cpuinfo To display information about more than one file, pass the filenames, as arguments, separated by space: wc /proc/cpuinfo /proc/meminfo ![]() When using the standard input, the file name is not shown: wc < /proc/cpuinfo 448 3632 22226 The output will look something like the following: 448 3632 22226 /proc/cpuinfo When using the standard input the fourth column (filename) is not displayed.įor example, the following command will display information about the virtual file /proc/cpuinfo: wc /proc/cpuinfo In it’s simplest form when used without any options, the wc command will print four columns, the number of lines, words, byte counts and the name of the file for each file passed as an argument. A word is a string of characters delimited by a space, tab, or newline. If no FILE is specified, or when FILE is -, wc will read the standard input. The wc command can accept zero or more input FILE names.
0 Comments
Leave a Reply. |