linux count how many lines in a file code example Example: shell count number of lines $ wc -l < /dir/file.txt 3272485