How to count lines fast?

前端 未结 6 1394
感情败类
感情败类 2020-12-09 15:34

I tried unxutils\' wc -l but it crashed for 1GB files. I tried this C# code

long count = 0;
using (StreamReader r = new StreamReader(f))
{
    st         


        
6条回答
  •  执念已碎
    2020-12-09 15:52

    Are you just looking for a tool to count lines in a file, and efficiently? If so, try MS LogParser

    Something like below will give you number of lines:

    LogParser "SELECT count(*) FROM file" -i:TEXTLINE
    

提交回复
热议问题