Powershell Count lines extremely large file
问题 I have a extremely large text file of size 250 GB that's given to us by a vendor. They also give us a control file that is supposed to have the number of lines in the large file. Sometimes there is a mismatch. How do I count lines in Powershell? I tried this command and it ran for more than half hour and was not done yet. Get-content C:\test.txt | Measure-Object –Line (gc C:\test.txt | Measure-object | select count).count Any help is appreciated Thanks MR 回答1: If performance matters, avoid