Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can i count characters, words and lines from a file with wc command?

share|improve this question

migrated from Mar 25 '10 at 11:57

This question came from our site for professional and enthusiast programmers.

does wc --help not work? – SilentGhost Mar 25 '10 at 11:55
Try: man wc . – Yacoby Mar 25 '10 at 11:56
look at the man wc page. or info wc page – user31894 Mar 25 '10 at 11:57

Lines: wc -l filename.txt

Characters: wc -m filename.txt

Words: wc -w filename.txt

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.