Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a command in the Windows DOS prompt that is equivalent to the UNIX less or more?

Basically, the problem is that when I type hg log, the output has too many lines to fit on the screen and I want to paginate it.

Any ideas on how to solve this problem?

share|improve this question
2  
less: greenwoodsoftware.com/less it is part of the gnuwin32 set of ports for windows: gnuwin32.sourceforge.net/packages.html –  MaQleod May 19 '12 at 2:41
add comment

2 Answers

Windows has the command more. E.g. (Taken from Wikipedia)

To display the file named letter.txt on the screen, the user can type either of the following two commands:

 more < letter.txt
 type letter.txt | more 

So in your case you want hg log | more.

For heavier usage you will want something like UnxUtils or GnuWin32, which have a more powerful less utility.

. enter image description here

share|improve this answer
    
Well, that's convenient now isn't it? Thanks! –  Jeffrey Greenham May 18 '12 at 23:56
1  
Yea, but the Windoze version only pauses the screen for a page at a time. You can't page up and down through the output. I've never used gow (mentioned in another reply) but I use UnxUtils every day. I love having grep, more, head, tail, sed, wc and other tools in Windoze. –  Tom May 19 '12 at 2:35
1  
@Tom: That is what more does on *nix as well. less is the one with backwards scrolling support, as you've noticed. –  Daniel Andersson May 20 '12 at 21:31
add comment

If you don't mind installing additional software gow is a nice toolkit with a set of standalone unix style tools that you can use, including less and more - it requires an install since it adds itself to path, but you can copy and use the install directory elsewhere as well.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.