Vidyalelo
Computer Science · Q1

Linux

Engineering and GATE · Computer Science · question 1

Q1

What command is used to count the total number of lines, words, and characters contained in a file?

A.
countw
B.
wcount
C.
wc
Answer
D.
count p
E.
None of the above

Answer: Option C

Solution

Answer: Option C
Solution:
The wc command is used to count the total number of lines, words, and characters contained in a file.
Using this command, you can quickly get statistics about a file's content, which is useful for various purposes, such as analyzing text files or checking the size of files.
It stands for "word count," but it can also count lines and characters depending on the options provided.
So, in summary, to count lines, words, and characters in a file, you'd use the wc command in Linux.