xsel
X11 selection and clipboard manipulation tool. More information: https://manned.org/xsel.
- Use a command's output as input of the clipboard (equivalent to
<Ctrl c>):
echo 123 | xsel
- Use the contents of a file as input of the clipboard:
cat | xsel
- Output the clipboard's contents into the terminal (equivalent to
<Ctrl v>):
xsel
- Output the clipboard's contents into a file:
xsel >
- Clear the clipboard:
xsel
- Output the X11 primary selection's contents into the terminal (equivalent to a mouse
<MiddleClick>):
xsel
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
