簡單過一遍安裝步驟
1、首先要有iTerm2
iTerm2官網(wǎng)下載地址:iTerm2下載鏈接
2五垮、本地安裝lrzxz
brew install lrzsz?
3乍惊、下載iterm2-send-zmodem.sh 和 iterm2-recv-zmodem.sh腳本文件
4、將這兩個腳本文件保存到/usr/local/bin/ 路徑下拼余,cd到該目錄下為其添加可執(zhí)行權(quán)限污桦。
chmod +x iterm2-send-zmodem.sh
chmod +x iterm2-recv-zmodem.sh
5亩歹、iterm2 添加 triggers
打開“Preferences”面板->Profiles選項卡->Advanced->Triggers(點擊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
見下圖
標題黨把大家騙進來就是為了告訴大家匙监,在第一次運行前一定要確保該選項是勾上的。反正擼主第一次忘了勾小作,RZ命令沒有效果亭姥,之后發(fā)現(xiàn)沒勾勾上后還是沒有X用。要是哪個倒霉孩子跟我一樣顾稀,那就把iTerm2卸了再重來一遍吧达罗,親測有效(不好意思,只找到這么low的方法静秆,sigh)
一切就緒就可以愉快地使用了粮揉。
再啰嗦一嘴,在遠程服務(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