Find the answer to your Linux question:
Results 1 to 5 of 5
If I cat a file, the results show up on the terminal. If I highlight those lines, and ctrl-C them, they will not paste into, for example, Thunderbird mail. How ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2006
    Posts
    13

    cut and paste from CLI


    If I cat a file, the results show up on the terminal. If I highlight those lines, and
    ctrl-C them, they will not paste into, for example, Thunderbird mail. How can I do that?
    If there is a pipe command, where would I pipe to? (I tried on PCLOS.)
    --doug

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,356
    Copy&Paste works different on unix.
    Select the text with the mouse, no other action is needed to pick it up.
    To paste it, press the middle mouse button, alternatively both mouse buttons, alternatively <shift>+<insert> (, alternatively <ctrl>+<v>)

    The last one was added to *graphical* environments (not the terminal, as <ctrl> + <something> is used to send signals to processes here), because so many (windows) users were used to <ctrl>+<c>, <ctrl>+<v>.
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Sep 2006
    Posts
    13
    Thank you. You seem to be only partially right. Ctrl-v does not work on my OS--PCLOS--but the both mouse button trick does. (I wish you could still buy
    a three-button track-ball for a reasonable price.) Shift-insert does not work either.

    Happy Thanksgiving--doug

  4. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,356
    Good that it worked out for you.

    Actually, I found this
    The X Window System® uses two separate clipboard buffers: the “selection” and the “clipboard”. Text is placed in the selection buffer by simply selecting it, and can be pasted with the middle mouse button. To place text in the clipboard buffer, select it and press Ctrl-X or Ctrl-C. Text from the clipboard buffer is pasted using Ctrl-V or by selecting Edit->Paste.
    And as I said ctrl is used for signals in shells, therefore terminals dont use it for copy&paste.

    Also, shift insert does work in a terminal, just select any text and press that combination.
    You must always face the curtain with a bow.

  5. #5
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Many terminal apps do support copy/paste from the clipboard buffer with CTRL+SHIFT+C/V. AFAIK, gnome-terminal, konsole, XFCE Terminal, LXterm all support that, as well as the primary buffer highlight+middle click method.

    You can also remap keys to simulate a middle click. I have the menu key mapped to a middle click. Here is a guide for that.

    Linux Aleph: mapping middle-click to a keyboard key

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •