Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sometimes, when I paste things into Putty, it runs them automatically. Other times, it waits for me to his Enter before running the command. Why the erratic behavior?

share|improve this question

In the first instance, you're pasting the command with a newline, which is getting sent to the terminal and is equivalent to ENTER.

In the second instance you've copied and pasted a command without a newline, so it is waiting for ENTER to run the command.

share|improve this answer
If I make extra-double sure to only copy the command up to the last character, will that stop the newline from being copied? – mattloaf1 Dec 12 '09 at 17:17
It will indeed. Copying and pasting is generally application specific on Windows, as they control access to the clipboard. So it can depend where you are copying from and what that does, but generally if you're quite careful about setting the marker just to the last character, and not further onto the end of the line (it's like an invisible line!) you normally get away with it. If you're not sure, I sometimes find selecting right to left instead of left to right can work – Philip Reynolds Dec 12 '09 at 17:21

I would guess that you get a linefeed copied into the clipboard sometimes. To check if this is the case, try running clipbrd.exe or simply pasting the contents into your favorite control-char-displaying editor.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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