Use the rz, sz command on mac, rzsz
The rz and sz commands are used on mac. The terminals on mac do not support rz and sz. Therefore, install iterm and configure rz and cz
1. Download and install iterm2 first.
Http://www.iterm2.cn/download
2. Use brew to install lrzsz
Enter brew install lrzsz on the terminal. If homeBrew is not installed, install it first.
After installation, check whether ls-alh/usr/local/bin/sz exists.
3. Add a trigger
After the lrszs command is successfully installed, you need to create two scripts to the/usr/local/bin directory. Script address:
Https://github.com/mmastrac/iterm2-zmodem
Finally, modify the iterm2 Configuration:
Open iterm2 ------ at the same time press command and, key ------- Profiles ---------- Default ------- Advanced ------ Triggers Edit button
Click "+" to add the following parameters. For more information, see
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
4. Run the rz and sz commands.
Enter the sz + file name under a directory. You can download an object and select the directory to which it is downloaded.
Enter a directory. You can use rz to upload a file and select the file to be uploaded.