+2 votes
in Operating Systems by (14.6k 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

0 votes
by (25.6k points)

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


$ wc -l covariates.txt

20783244 covariates.txt