Powershell:如何对非常大的文件中的文本进行流式传输、分页?
我有一些巨大的日志文件需要查看。我不想尝试在编辑器中打开它们,并且我希望能够以分页方式滚动它们。似乎 powershell 中有一个 more 的别名,但通过管道传递到它不会执行任何操作,并且 get-help 只会产生“more”。
在我看来,这似乎是一个完全愚蠢的问题,但我还没有弄清楚——如何才能得到类似于 unix more 命令的东西?
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 seems 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试 Out-Host cmdlet:
Try the Out-Host cmdlet:
这是一种方法:
This is one way: