iTerm2安装lrzsz命令出错解决

简单过一遍安装步骤

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容