• Home
  • LLMs
  • Docker
  • Kubernetes
  • Java
  • All
  • About
Linux-Ubuntu | wc - print word counts
  1. Notes
  2. Examples
  3. Command Help (man wc)

  1. Notes
    wc [OPTION]... [FILE]...
  2. Examples
    • Count files and folders:
      $ ls | wc -w
      14

    • Count lines in a file:
      $ wc -l test.txt
      26 test.txt
  3. Command Help (man wc)
    The following options can be used:
    -w, --words
    |print the word counts
    
    -m, --chars
    |print the character counts
    
    -l, --lines
    |print the newline counts
    
    -c, --bytes
    |print the byte counts
© 2025  mtitek