簡(jiǎn)單過(guò)一遍安裝步驟
1、首先要有iTerm2
iTerm2官網(wǎng)下載地址:iTerm2下載鏈接
2、本地安裝lrzxz
brew install lrzsz?
3、下載iterm2-send-zmodem.sh 和 iterm2-recv-zmodem.sh腳本文件
4、將這兩個(gè)腳本文件保存到/usr/local/bin/ 路徑下,cd到該目錄下為其添加可執(zhí)行權(quán)限。
chmod +x iterm2-send-zmodem.sh
chmod +x iterm2-recv-zmodem.sh
5、iterm2 添加 triggers
打開(kāi)“Preferences”面板->Profiles選項(xiàng)卡->Advanced->Triggers(點(diǎn)擊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
見(jiàn)下圖

標(biāo)題黨把大家騙進(jìn)來(lái)就是為了告訴大家,在第一次運(yùn)行前一定要確保該選項(xiàng)是勾上的。反正擼主第一次忘了勾,RZ命令沒(méi)有效果,之后發(fā)現(xiàn)沒(méi)勾勾上后還是沒(méi)有X用。要是哪個(gè)倒霉孩子跟我一樣,那就把iTerm2卸了再重來(lái)一遍吧,親測(cè)有效(不好意思,只找到這么low的方法,sigh)
一切就緒就可以愉快地使用了。
再啰嗦一嘴,在遠(yuǎn)程服務(wù)器端也需要事先安裝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