how to find no. of lines in file in shell code example Example: shell count number of lines $ wc -l < /dir/file.txt 3272485