[Terminal] 如何用命令行将文件复制到剪贴板
Tofloor
poster avatar
Free_Aaron.Li
deepin
2022-08-04 03:09
Author

如题,

今天想写一个Desktop快捷方式,想直接用neovim编写,发现appimage的路径太长了,想直接通过将文件复制到剪贴板的方式得到文件绝对路径。

发现deepin自带的剪贴板不是xsel,没法直接将文件复制到剪贴板。

所以求助一下如何通过命令将文件复制到剪贴板。

sweat

Reply Favorite View the author
All Replies
寂静的羽夏
deepin
2022-08-04 03:13
#1

你表述是啥意思呀?你直接对选中一个文件 Ctrl + C ,然后到文本编辑器直接 Ctrl + V 就是文件的绝对路径啊。

confused

Reply View the author
Free_Aaron.Li
deepin
2022-08-04 03:48
#2
寂静的羽夏

你表述是啥意思呀?你直接对选中一个文件 Ctrl + C ,然后到文本编辑器直接 Ctrl + V 就是文件的绝对路径啊。

confused

想只用终端,不使用图形界面。通过命令方式复制文件绝对路径

Reply View the author
阿顺呀
deepin
2022-08-04 04:00
#3
Free_Aaron.Li

想只用终端,不使用图形界面。通过命令方式复制文件绝对路径

那你应该直接用 只有命令行的服务器版本😂

Reply View the author
我的胜利
deepin
2022-08-04 04:03
#4

没办法Tab补全笨办法

Reply View the author
ljq790615
deepin
2022-08-04 04:07
#5

在终端获取绝对路径:dirs -l

没用过neovim,不知里面有没有终端,如果有的话,应该不难处理。

Reply View the author
charm
deepin
2022-08-04 04:35
#6
It has been deleted!
Ziggy
deepin
2022-08-04 07:05
#7

所以你为什么不直接把文件拖进去呢confused

Reply View the author
云的眼泪
deepin
2022-08-04 16:47
#8

你安装一下xsel不就行了

用pwd命令可以显示当前路径

Reply View the author
云的眼泪
deepin
2022-08-04 16:54
#9

用find命令也可以显示完整路径

find / -name 文件名

会先查找当前目录,查找到后就会显示完整路径和文件名,然后ctrl-c打断即可。

Reply View the author
vivian_me
deepin testing team
2022-08-05 01:25
#10

confused

Reply View the author