Bird
0
0

Which option with wc will count only the number of words in a file named notes.txt?

easy📝 Conceptual Q2 of 15
Linux CLI - Viewing and Editing Files
Which option with wc will count only the number of words in a file named notes.txt?
Awc -l notes.txt
Bwc -w notes.txt
Cwc -c notes.txt
Dwc -m notes.txt
Step-by-Step Solution
Solution:
  1. Step 1: Identify option for word count

    The -w option counts words in the file.
  2. Step 2: Confirm other options meanings

    -l counts lines, -c counts bytes, -m counts characters.
  3. Final Answer:

    wc -w notes.txt -> Option B
  4. Quick Check:

    -w = word count [OK]
Quick Trick: Use -w to count words only [OK]
Common Mistakes:
MISTAKES
  • Using -l for words
  • Confusing -c with word count
  • Using -m incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes