+2 votes
in Operating Systems by (63.4k points)
I have a very large file, so when I open it using nano/vi, my system just sleeps. Is there any way to count the number of lines in the file without opening it.

1 Answer

+1 vote
by (271k points)
selected by
Best answer

You can use "wc -l" to count to number of lines in a file.


$ wc -l covariates.txt

20783244 covariates.txt