MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

UNIX

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Unix command to get the word count
A
WC demo.txt
B
wc demo.txt
C
wc-l demo.txt
D
wc-w demo.txt
Explanation: 

Detailed explanation-1: -You can use the wc command to count a file’s word, line, character, or byte count. But those aren’t the only system tasks it can handle. The Linux wc command calculates a file’s word, line, character, or byte count. Far from just being a utility for word processing, wc is a useful tool for a variety of system tasks.

Detailed explanation-2: -The wc command is used to find the number of lines, characters, words, and bytes of a file. To find the number of lines using wc, we add the-l option. This will give us the total number of lines and the name of the file.

There is 1 question to complete.