I'm in the middle of running a batch script that's taking a really long time and whose output is whizzing by at an unreadable rate. Is there a keyboard shortcut that allows you to pause the CMD console where it currently is to stop and read the output, and then re-start it again from the same place?
I didn't see this in the other answers.
I believe the serial control sequences of 'Ctrl-S' XOFF and 'Ctrl-Q' XON are the key sequences intended to solve the issue.
Does your keyboard contain the Pause/Break key? It would serve well for this. Here's what it looks like, or at least used to:
As an interesting bonus, this key can also be used during POST (Power On Self Test, which runs when the computer is turned on) to read output from the BIOS.
If you don't have that key, the combination Control + NumLock should work just the same, and there are other options depending on your manufacturer, according to Wikipedia.
To resume execution, press Enter.
There are a couple other methods here to add, if we're being thorough:
1) In addition to the Pause/Break button you can duplicate it's functionality by Using "CTRL+C".
This will cause the cmd script to pause and ask you if you would like to terminate it. Once you are done looking you can select "NO" (or perhaps yes if it suits you) and it will continue (Or exit, if you chose yes).
2) You can ALSO pause using the mouse by clicking your mouse cursor in the window to select text from the CMD Terminal.
You may have noticed this pausing output in the past and thought only the output to be delayed, however when scripts are running in interactive cmd instances you are actually pausing the execution of the code (The same as with "Pause/Break" and "CTRL+C" Methods).
However once the window loses focus, or you click to unpause things, the code execution will continue, and you have no option to end the code through this manner.
On windows systems, if the output screen has enabled Quick Edit Mode (by Configuration) just click on the screen and select any part of the screen. The program will stop execution until you right-click on the screen to un-select. The screen can lose focus and it will continue to be frozen until you come back and right click on it. Beware that any content of the Clipboard, if any, can be turned over that screen when you right click on it.
You can use ProcessExplorer or similar TaskManager program -> RMB on the process that's running inside the cmd (not the main cmd process itself) -> Suspend. Then whenever you want RMB on it again -> resume
Note: If you use ProcessExplorer to do this you might want to keep it open until you hit 'Resume'. If you instead close it down then reopen whenever you want to resume the process, I've noticed that sometimes it bugs out and does not recognize that the current state of that process is 'Suspended'; thus if you click 'Resume' in that case it might not resume it. But if you keep PE open until you want to resume the process again then all will work fine. If you're worried about the resources Process Explorer might consume while its open, you can simply do View -> Update Speed -> Paused.