在 mac 下,实现与服务器进行便捷的文件上传和下载操作。
步骤
1.安装支持rz和sz命令的lrzsz:brew install lrzsz
等了挺长时间的。
2.下载iTerm2-zmodem
1 2 3 4
| 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-*
|
3.设置一下两个脚本的权限,一般 chmod 777 就行了
1
| chmod 777 /usr/local/bin/iterm2-*
|
4.设置Iterm2的Tirgger特性,profiles->default->editProfiles->Advanced中的Tirgger
添加两条trigger,分别设置 Regular expression,Action,Parameters,Instant如下:
1 2 3 4 5 6 7 8 9 10
| 1.第一条 Regular expression: rz waiting to receive.\*\*B0100 Action: Run Silent Coprocess Parameters: /usr/local/bin/iterm2-send-zmodem.sh Instant: checked 2.第二条 Regular expression: \*\*B00000000000000 Action: Run Silent Coprocess Parameters: /usr/local/bin/iterm2-recv-zmodem.sh Instant: checked
|