Here is the video version, if you prefer it:
The wc
command is used to display the number of lines, words and bytes contained in files. (Shotts, 2019) It is used as follows:
wc fileName
It outputs three numbers – the first number is the number of lines in a file, the second number is the number of words contained in a file and a third number is the number of bytes contained in a file.
An example:
mislav@mislavovo-racunalo:~$ cat file.txt
Some line
Some other line
mislav@mislavovo-racunalo:~$ wc file.txt
2 5 26 file.txt
I have personally never used this command (never had the need).
Hope you learned something useful today!
References
Shotts, W. (2019). The Linux Command Line, Fifth Internet Edition. Retrieved from http://linuxcommand.org/tlcl.php. Page 87
Subscribe to my newsletter to keep abreast of the interesting things I'm doing. I will send you the newsletter only when there is something interesting. This means 0% spam, 100% interesting content.