Count Lines in Shell

Level 114 keystrokes

wc -l counts the number of lines in a file.

Shell code

# wc = word count; -l counts only newline characters (lines)
# Prints the count followed by the file name: 1000 data.csv
1wc -l data.csv

Output

1000 data.csv
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this Shell code and how often they appear.

  • -× 1
  • .× 1

More Shell examples at level 1

← Shell typing practice