Janak Janak - 1 year ago 125
Linux Question

commandline overwrites itself when the commands get to long

I'm using Putty to log into a debian server. I have this odd problem that when a command I'm typing gets too long, it doesn't wraparound and start a new line, instead it starts at the beginning of the same line and starts to overwrite the prompt and then the beginning of the command.

The command will run just fine, but it is really annoying, I'm assuming there is some setting that would fix this for me?

Answer Source

I've seen this behavior when you resize the Putty window while another command is running since bash doesn't get the signal telling it the window has resized.

If this is the problem adding:

shopt -s checkwinsize

should make it go away.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download