6

According to wikipedia in the bash shell control+u

Clears the line content before the cursor and copies it into the clipboard

If I'm ssh'ed into a box and try that, the text certainly disappears but I have no idea where it goes. Can I access it somehow? I don't want to have to use xsel or set up x-forwarding, I am just curious if it is stored in some register somewhere remotely. For example, I tried starting vim and typing "*p or "+p to paste from the system clibpoard but am not having any luck.

If I use control+u remotely when ssh'ed to a box, where does it go, and can I access it?

  • 1
    I think that x-forwarding (which is really just as simple as adding -X to your SSH options) should enable "*y in vim, if vim on the server has X-clipboard support built in. Otherwise, no, there's no shared clipboard. – ams Apr 16 '12 at 16:36
6

You can yank (paste) it back somewhere with Ctrl-y as in emacs.

See the "Killing and Yanking" subsection of bash manual "Readline" section.

  • 2
    Yes, this is bash's internal clipboard, completely confined to that remote invocation of bash. (There's no notion of an interprocess clipboard in the shell environment; normally X provides this.) – 9000 Apr 16 '12 at 16:25

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.