How to get the total number of lines in a file faster in Linux. Considering the number of lines in the file is around 100 million. wc -l takes a lot of time.
I'd think wc is the standard for a task like this. But are all of the lines the same length? If so, you could divide the file size by the line length to get number of lines.
Usually I use wc -l to count the lines of a file. However for a file with 5*10^7 lines, I get only 10^7 as an answer. I've tried everything proposed here here: How to count lines in a document? B...