Which of the following commands is used to count the number of bytes in a file?

Which of the following commands is used to count the number of bytes in a file?

Which of the following commands is used to count the number of bytes in a file?

A.
wc -l filename

B.
wc -c filename

C.
wc -m filename

D.
wc -w filename

Explanation:

The -c option with the wc command is used to count the number of bytes in a file. It shows only the
number of bytes used by a file.
Answer option A is incorrect. The -l option with the wc command is used to count the number of
lines in a file. It shows only the number of lines in a file.
Answer option D is incorrect. The -w option with the wc command is used to count the number of
words in a file. It shows only the number of words in a file.
Answer option C is incorrect. The -m option with the wc command is used to count the number of
characters in a file.



Leave a Reply 0

Your email address will not be published. Required fields are marked *