count = 0
    with open('/cm/com.file','rb') as f:
        while True:
            buffer = f.read(1024*8192)
            if not buffer:
                break
            count += buffer.count(b"\n")
    print(count)

 

相关文章:

  • 2021-12-04
  • 2021-06-17
  • 2021-10-07
  • 2022-03-04
  • 2021-12-03
  • 2021-08-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
  • 2022-01-30
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案