偶遇一种复制内容到剪贴板的工具

来源:互联网 发布:jav网络机顶盒怎么样 编辑:程序博客网 时间:2024/06/05 10:58

学习Git偶然看到的,记之。

Run the following code to copy the key to your clipboard.

sudo apt-get install xclip# Downloads and installs xclip. If you don't have `apt-get`, you might need to use another installer (like `yum`)xclip -sel clip < ~/.ssh/id_rsa.pub# Copies the contents of the id_rsa.pub file to your clipboard

Alternatively, using your favorite text editor, you can open the ~/.ssh/id_rsa.pub file and copy the contents of the file manually

之前我了解的一种复制方法就是使用 xsel ,命令如下

cat 文件名 | xsel -b

xsel < 文件名

0 0
原创粉丝点击