1.安装Iterm2, homebrew
brew install iterm2
2.安装lrzsz:
brew install lrzsz
3.下载github上的脚本,然后copy到/usr/local/bin中
cd ~
git clone https://github.com/mmastrac/iterm2-zmodem.git
mv ~/iterm2-zmodem/iterm2-recv-zmodem.sh /usr/local/bin/iterm2-recv-zmodem.sh
mv ~/iterm2-zmodem/iterm2-send-zmodem.sh /usr/local/bin/iterm2-send-zmodem.sh
4.在ITerm2中对应的profile中“Advance”->”Trigger” 中填入:
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
保存即可、、、
linux 安装
yum install lrzsz -y
上传 rz
下载 sz filename