其他分享
首页 > 其他分享> > iterm2文件上传下载

iterm2文件上传下载

作者:互联网

安装iterm2

https://iterm2.com/downloads.html

安装homebrew

https://docs.brew.sh/Installation

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

安装lrzsz

brew install lrzsz 

安装执行脚本

将iterm2-send-zmodem.sh和iterm2-recv-zmodem.sh保存到/usr/local/bin目录下(见github)

修改权限

chmod 777 /usr/local/bin/iterm2-*

设置Iterm2

进入:profiles->default->editProfiles->Advanced->edit
添加两条trigger,分别设置 Regular expression,Action,Parameters,Instant如下:

Regular expression: rz waiting to receive.\*\*B0100
Action: Run Silent Coprocess
Parameters: /usr/local/bin/iterm2-send-zmodem.sh
Instant: checked

Regular expression: \*\*B00000000000000
Action: Run Silent Coprocess
Parameters: /usr/local/bin/iterm2-recv-zmodem.sh
Instant: checked

示例图:
在这里插入图片描述
在这里插入图片描述

在服务器端使用

上传文件:rz
下载文件:sz file1 file2 file(n)…

参考:

https://github.com/snow-sprite/rzsz/blob/master/README.md

标签:bin,文件,上传下载,iterm2,sh,https,local,zmodem
来源: https://blog.csdn.net/qq_41615453/article/details/120123996