Equivalent of 'more' or 'less' command in Powershell?

后端 未结 12 2067
小蘑菇
小蘑菇 2020-12-13 01:38

Is there a way to paginate the output by piping it to some \'more\' command, which is available in linux\\unix shells?

12条回答
  •  佛祖请我去吃肉
    2020-12-13 01:58

    more isn't used to limit output, it's used to paginate output and make it easier to read in a terminal, if anything.

    Are you talking about using head and tail? EggHeadCafe has an example of:

    type my.txt | select-object -first 10
    
    type my.txt | select-object -last 10
    

    to emulate head and tail.

提交回复
热议问题