sathish
asked Feb 28 2017
Answer
Use wc
wc -l
This will output the number of lines in
$ wc -l /dir/file.txt
3272485 /dir/file.txt
Or, to omit the
$ wc -l < /dir/file.txt
3272485
You can also pipe data to wc as well
$ cat /dir/file.txt | wc -l
3272485
$ curl yahoo.com --silent | wc -l
63
linuxhelp
asked Jan 14 2019
How to count lines in files through command prompt in Linux
Hello too all..,
is there any possible way to count no of lines in a file...? through linux command prompt....