17

I want to be able to scroll up further to see the result of a command. For example, if I type dir in a directory with a lot of listings, like C:\windows, the output will be very long. When I try to scroll up, I'll probably go from z to s and never get to the r's. Too many files/directories in the folder.

How can I increase the buffer, so that I can read a longer output history?

KovBal
  • 1,250
Wolfpack'08
  • 1,364

6 Answers6

17

You have three options.

  1. Either you augment the buffer size of your cmd.exe window, like stated in another answer (drop down menu (CTRL+SPACE) > Properties > Increase buffer size

  2. Either you redirect the output of your command to a file that you'll then be able to edit with any other tool you like (notepad, or even a CLI editor like "edit") :

    dir > directory.txt

  3. Or you may consider command-line alternatives under Windows (I've never understood how the cmd.exe hadn't been rewritten by Microsoft in order to have something with less limitations and more ease of use).

    You can check for example "Console", an open source project, with multi-tabs and a few intersting options, including a larger buffer.

    There are other alternatives but none that i'm aware of that would be free.

Sergio
  • 303
9

Right-click on the CMD prompt's Title bar > Properties > Layout > Screen buffer size will let you increase the screen buffer size.

As far as pausing goes, as Serodis suggested, instead of /p most cmd/DOS (not equal, I know, but this goes for both) work with |more suffix.

Rook
  • 24,289
5

You can go to drop-down->properties->increase buffer size. I figured this out by googling more.

Wolfpack'08
  • 1,364
3
dir /p

Is the normal operation to part-out the results so you can scroll through slowly.

Serodis
  • 442
1

Aside from the answers already given, the Powershell ISE keeps a full buffer of everything in the prompt window.

If you launched your command from an ISE window, you would be able to scroll to the top no matter how much output there is.

1

On Windows 11. Command Prompt can be launched from Windows Terminal.

The Screen buffer size is called "History size"

To increase, open the Windows Terminal Settings using CTRL+,

Click the Command Prompt profile tab on the left

Then under the Additional settings header click the Advanced menu

Command Prompt additional settings menu

The Advanced submenu will display a History size option (The number of lines above the ones displayed in the window you can scroll back to).

Command prompt advanced settings windows 11 screen buffer size

Increase the History size from the default of "9001"

The maximum supported size history size is "32767" even if you enter a number higher than this.

Click Save and restart Windows Terminal for the changes to take effect

It is also possible to Save the contents of the Window buffer to file by right clicking the command tab and clicking the Export Text context menu option

Command Prompt Export Text

References

https://learn.microsoft.com/en-us/windows/terminal/customize-settings/profile-advanced