Use Case
Counting the number of records of a large data file, which cannot be opened with a text editor or Excel.
wc command (Unix)
This command is used to find the number of lines, characters, words and bytes of a file. Counting number of lines with -l flag is probably the most common tasks in data processing.
$ wc -l BigDataFile.csv 83998131 BigDataFile.csv
Some of the common options are:
-l, - lines - Print the number of lines. -w, - words - Print the number of words. -m, - chars - Print the number of characters. -c, - bytes - Print the number of bytes. -L, - max-line-length - Print the length of the longest line.
Command Prompt (Windows)
Windows does not have a simple wc equivalent utility. Instead, we can use FIND command.