Which command is used to count just the number of characters in a file? A. wc – 1 B. wc -c C. wc -w D. wc -r E. None of the above

wc - 1
wc -c
wc -w
wc -r E. None of the above

The correct answer is B. wc -c.

The wc command is used to count the number of lines, words, and characters in a file. The -c option tells wc to count only the number of characters.

The other options are as follows:

  • A. wc -1: This option tells wc to count the number of lines in a file.
  • C. wc -w: This option tells wc to count the number of words in a file.
  • D. wc -r: This option tells wc to read the file in reverse order.
  • E. None of the above: This is not a valid option for the wc command.