开发者

Powershell: how to stream, paginate text from very large files?

I've got some huge log files that I need to view. I don't want to attempt to open them up in an editor, and I'd like to be able to scroll through them in a paginated manner. It seems as if there is an alias for more in powershell but piping to it doesn't do anything and get-help yields only "more."

This see开发者_StackOverflow中文版ms to me like a totally silly question, but I haven't figured it out yet--how can I get something similar to the unix more command?


Try the Out-Host cmdlet:

Get-Content file.txt | Out-Host -Paging


This is one way:

get-content file | out-host -Paging
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜