The wc command on Linux shows the lines, words, and number of characters in a file, in this order.
Suppose you want to count the number of lines, words, or characters in a file. The wc command can be used to count the lines, words, and characters in one or more files. If more than one file is passed as an argument, it will show the statistics for each file and the total.
The most common options are:
In this example, we are going to use the toilet to count the unique items on the grocery list:
$ sort supermarket | uniq | wc 6 6 41
Our list has 6 items (one per line), six words, and 41 characters.
The sudo command on Linux executes a given command as if it were another user.…
The ss command on Linux is extremely useful for investigating sockets, providing various information about…
Free Linux command shows the amount of total memory in use and available, as well…
The shell has structures for testing conditions and executing certain program sequences several times (loop),…
The /etc/fstab file stores the configuration of which devices should be mounted and what is…
The Netcat Command in Linux or nc is a utility used to do “almost anything”…
This website uses cookies.