3

trzsz 已实现 “拖文件自动上传到远程服务器”,支持多种平台的原生终端。

 2 years ago
source link: https://www.v2ex.com/t/858892
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  程序员

trzsz 已实现 “拖文件自动上传到远程服务器”,支持多种平台的原生终端。

  LonnyWong · 1 小时 20 分钟前 · 182 次点击

1 、在本地使用 trzsz -d ssh x.x.x.x 登录服务器。加 -d 是开启拖文件上传功能,默认是不开启的。

2 、将 trztsz 放到服务器某个 PATH 目录下,要有可执行权限。执行命令 trz -v 不会报错即可。

项目地址:https://github.com/trzsz/trzsz-go ,给个 Star 支持下?

Release 中下载的 zip 里就是三个 trzsztrztsz 可执行程序,也可以自己 clone 下来 make 编译。

在 Mac 上的效果如图(也支持 Windows 和 Linux 的):

drag_files.gif

踩坑指南(特别是 Windows ):

1 、trzsz ssh 时记得加上 -d--dragfile,如 trzsz -d ssh x.x.x.x

2 、记得将 trz 放到远程服务器某个 PATH 目录下,要有可执行权限。

3 、在 Windows 的 cmd 、PowerShell 、Terminal 上,标题不要有“管理员”,即不要“以管理员身份运行”它们,要不然可能拖不了文件。在我的电脑上 Terminal 总是以管理员运行,后来设置一下 UAC 重启电脑就好了。

4 、在 Windows 的 cmd 、PowerShell 中,拖多个文件进去,也只有一个文件生效的( 鼠标指向那个 )。

5 、在 Windows 的 Terminal 中,要拖文件到左上角,出现“粘贴文件路径”时再放开鼠标,要不然没用。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK