Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
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

1 Answer 1

up vote 5 down vote accepted

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

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

share|improve this answer
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

 
discard

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.