Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

More lines in command window

Is there a possibility to get "more" lines into the command window (Console)?

When I debug my programs I output quite a bunch of lines to the window and the beginning of the ouput keeps disappearing out of the range I can scroll back the window so I don't see my complete output from the beginning of the program.

How can I get the command window to keep all lines?

(And yes I could as well write it into a text-file as a log, but I'd like to try it like this for a change)

like image 287
F.P Avatar asked Nov 16 '09 08:11

F.P


People also ask

How do you increase the number of lines in Command Prompt?

If you're using windows , click on the CMD icon in the top left corner and go to properties. Click the Options tab. In Command History, type or select 999 in Buffer Size, and then type or select 5 in Number of Buffers.

How do I expand a Command Prompt window?

Change Command Prompt Width Right-click on the prompt boarder and select Properties… Now select the Layout tab and change the Window Size width, by default it is 80. Here you can change the Screen Buffer Size Width and Window Position. When you're finished click OK.

How do I run multiple command lines?

Try using the conditional execution & or the && between each command either with a copy and paste into the cmd.exe window or in a batch file. Additionally, you can use the double pipe || symbols instead to only run the next command if the previous command failed.

How many lines can cmd show?

Summary. Windows (better, cmd.exe) has a command line length limit of 8192 characters.


3 Answers

At least in Win7, Kristina's answer now seems to be either its memory of commands typed in the command lines, or the amount you can copy-paste.

To increase the scrollbar's memory, I did the following:

  • Go to properties as mentioned by Kristina
  • Go to the layout tab (that's the third one)
  • Modify the screen buffer size's height - 9999 is the maximum.

As mentioned by Joey in the comments to Kristina's answer, this will not work on things you've already done - only on things you do after making the change.

This answer was originally written when Kristina's was marked as accepted. Now that this is the accepted answer, I've edited my answer to avoid confusion.

like image 170
Scott Mermelstein Avatar answered Oct 18 '22 04:10

Scott Mermelstein


Just to complement the answer(s) above, its also possible to export the lines to a txt file using > fileName.txt

For example:

myProgram.exe > output.txt // will create a new file with all the output of myProgram
like image 31
Sergio Avatar answered Oct 18 '22 04:10

Sergio


If you're using windows , click on the CMD icon in the top left corner and go to properties.

Click the Options tab.

In Command History, type or select 999 in Buffer Size, and then type or select 5 in Number of Buffers.

like image 25
Kristina Brooks Avatar answered Oct 18 '22 03:10

Kristina Brooks