xclip and xsel copy to the X Windows primary selection buffer, also known as the cut buffer, by default. Paste from the cut buffer using the middle mouse button.
xsel -b or xclip -sel clip will copy to the copy/paste clipboard used in most window managers.
xclip -sel clip < file
xsel -b < file
echo "Hello world!" | xclip -sel clip
echo "Hello world!" | xsel -b

Linux tips home Linux home bavister.org home