Question: Who Wc Command in Unix?
Contents

The wc command in UNIX is a command line utility for printing newline, word and byte counts for files. It can return the number of lines in a file, the number of characters in a file and the number of words in a file. It can also be combine with pipes for general counting operations.

Who wc output?

who | wc -l in this command, the output of who command was fed as input to the second wc -l command. Thus inturn, wc -l calculates the number of lines present in the standard input(2) and displays(stdout) the final result. To see the number of users who are logged in, run who command with -q parameter as below.

What who wc command will do?

wc stands for word count. As the name implies, it is mainly used for counting purpose. It is used to find out number of lines, word count, byte and characters count in the files specified in the file arguments.

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest