美文网首页
iTerm2安装lrzsz命令出错解决

iTerm2安装lrzsz命令出错解决

作者: 朱佳宇 | 来源:发表于2017-12-19 21:49 被阅读0次

简单过一遍安装步骤

1、首先要有iTerm2

iTerm2官网下载地址:iTerm2下载链接

2、本地安装lrzxz

brew install lrzsz 

3、下载iterm2-send-zmodem.sh 和 iterm2-recv-zmodem.sh脚本文件

github下载链接

4、将这两个脚本文件保存到/usr/local/bin/ 路径下,cd到该目录下为其添加可执行权限。

chmod +x iterm2-send-zmodem.sh

chmod +x iterm2-recv-zmodem.sh

5、iterm2 添加 triggers

打开“Preferences”面板->Profiles选项卡->Advanced->Triggers(点击Edit即可)

Regular expression: \*\*B0100

Action: Run Silent Coprocess

Parameters: /usr/local/bin/iterm2-send-zmodem.sh

Regular expression: \*\*B00000000000000

Action: Run Silent Coprocess

Parameters: /usr/local/bin/iterm2-recv-zmodem.sh

见下图

标题党把大家骗进来就是为了告诉大家,在第一次运行前一定要确保该选项是勾上的。反正撸主第一次忘了勾,RZ命令没有效果,之后发现没勾勾上后还是没有X用。要是哪个倒霉孩子跟我一样,那就把iTerm2卸了再重来一遍吧,亲测有效(不好意思,只找到这么low的方法,sigh)

一切就绪就可以愉快地使用了。

再啰嗦一嘴,在远程服务器端也需要事先安装lrzsz。

yum -y install lrzsz

附rz sz命令使用方法

To send a file to a remote machine:

    Type "rz" on the remote machine

    Select the file(s) on the local machine to send

    Wait for the coprocess indicator to disappear

The receive a file from a remote machine

    Type "sz filename1 filename2 … filenameN" on the remote machine

    Select the folder to receive to on the local machine

    Wait for the coprocess indicator to disappear

相关文章

网友评论

      本文标题:iTerm2安装lrzsz命令出错解决

      本文链接:https://www.haomeiwen.com/subject/uicsvxtx.html