iTerm2中使用rz和sz

安装依赖

1
2
3
4
5
6
7
brew install lrzsz
brew install wget

cd /usr/local/bin
sudo wget https://raw.github.com/mmastrac/iterm2-zmodem/master/iterm2-send-zmodem.sh
sudo wget https://raw.github.com/mmastrac/iterm2-zmodem/master/iterm2-recv-zmodem.sh
sudo chmod 777 /usr/local/bin/iterm2-*

修改 iTerm2 Profile 配置

1
2
3
4
5
6
7
Regular expression: rz waiting to receive.\*\*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

参考资料

Mac上如何通过跳板机向服务器上上传大文件

Mac osx 下安装iTerm2,并使用rz sz上传下载(附homebrew配置)