1. Use brew to install lrzsz
sudo brew install lrzsz
After the installation is complete, check whether ls -alh /usr/local/bin/sz exists
If the installation reports an error, you can manually download the compressed package and install it, the installation address:
https://ohse.de/uwe/software/lrzsz.html
-
Put the downloaded file in the
~/Library/Caches/Homebrew
directory -
brew install lrzsz
- 2. Downloading zmodem is actually two simple shell files
https://github.com/mmastrac/iterm2-zmodem - save
iterm2-send-zmodem.sh
anditerm2-recv-zmodem.sh
to/usr/local/bin/ ,
还要设置权限
chmod -R 775 /usr/local/bin/iterm*zmodem.sh
- Configure Triggers in iTerm2: (Open iterm2 ------ Press command+, key at the same time --> Profiles --> Default --> Advanced --> Edit button of Triggers, configure the following parameters in the pop-up interface)
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
PS: The remote server also needs to install lrzsz. centOS installation method: yum -y install lrzsz