wc

Linux · Text · available in the simulator

What it does

Count lines, words, and characters.

Syntax

wc [-l] [-w] [-c] [-m] [archivo...]

Options and parameters

  • -l

    Count lines.

    wc -l archivo.txt
  • -w

    Count words.

  • -c

    Count bytes.

  • -m

    Count characters.

  • -L

    Display the length of the longest line.

Usage examples

  • wc archivo.txt
  • wc -l archivo.txt
  • wc -lwm archivo.txt
Practise wc

Related commands