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:est.txt | Measure-Object –Line
(gc C:est.txt | Measure-object | select count).count
Any help is appreciated Thanks MR
See Question&Answers more detail:os