Bird
0
0

Which command correctly counts the number of characters in data.txt?

easy📝 Syntax Q3 of 15
Linux CLI - Viewing and Editing Files
Which command correctly counts the number of characters in data.txt?
Awc -c data.txt
Bwc -m data.txt
Cwc -w data.txt
Dwc -l data.txt
Step-by-Step Solution
Solution:
  1. Step 1: Understand options

    -m counts characters, -c counts bytes, -w counts words, -l counts lines.
  2. Step 2: Choose correct option

    To count characters (including multibyte), use wc -m.
  3. Final Answer:

    wc -m data.txt -> Option B
  4. Quick Check:

    Use wc -m to count characters [OK]
Quick Trick: Use -m to count characters, not bytes [OK]
Common Mistakes:
  • Using -c which counts bytes, not characters
  • Confusing word count (-w) with character count

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes