Is there a keyboard shortcut to pause the output of a CMD window while it's running?

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?

enter image description here


Solution 1:

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.

Please see;

XON/XOFF

Solution 2:

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:

Pause Break Key from Wikipedia

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.

Solution 3:

You can use "more" command. Though it is not exactly what you are looking for, it will limit screen output by a page.

Solution 4:

Adding one more useful way for linux shells. (But maybe ok in windows too, try it!)

Presssing ctrl+z will hang the program. (Message: stopped)

To run it back again at his previous state, like if it were paused:

Type fg

Or for multiple usage: fg program_name_previously_ctrl+z_stopped`