10

I am on windows and often have to ssh to linux machines. Though as much as I would love to have an alternate ssh client, none really comes part to Putty. One thing or the other always breaks, even in putty the numpad becomes unusable. Anyway, I want to set the putty's window's width to more than my screen allows. So I can scroll horizontally to view it. The reason being that I run select * commands and those long records occupy many lines each affecting readability. Thanks!

7

PuTTY doesn't support that. What you can do is pipe your output through less with the -S option, which tells it not to wrap long lines, and use the left and right arrow keys to scroll sideways:

your_command | less -S

(Note that that will only work if the command is invoked from a shell, but not from within an SQL client or some such.)

1
3

PuTTY for Windows allows you to set the column width in the session settings.

If you are already logged on; right-click on the PuTTY title bar, choose "Change Settings..." from the popup. Click on the "Window" category, and change the columns (80 by default) under the "Set the size of the window". You can save this to your putty session too, if you like.

1

If you are using MySQL, a workaround is to set the pager to less.

Turn off auto wrap in PuTTY. (Under Terminal/ deselect "Auto wrap mode initially on")

mysql> pager less -S
PAGER set to 'less -S'

Then you can scroll left and right with arrows.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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