当前位置: 首页 > news >正文

2023-mac rz sz 安装

之前安装过一次,没问题,这次按照之前教程装了就不管上传下载都会卡住;

step1: 

brew install lrzsz

step2:在/usr/local/bin  路径下配置两个sh,之前从网上找到的直接用都不对,下面这个是调试过的正式可用的

iterm2-recv-zmodem.sh

#!/bin/bash
# Author: Matt Mastracci (matthew@mastracci.com)
# AppleScript from http://stackoverflow.com/questions/4309087/cancel-button-on-osascript-in-a-bash-script
# licensed under cc-wiki with attribution required
# Remainder of script public domainosascript -e 'tell application "iTerm2" to version' > /dev/null 2>&1 && NAME=iTerm2 || NAME=iTerm
if [[ $NAME = "iTerm" ]]; thenFILE=`osascript -e 'tell application "iTerm" to activate' -e 'tell application "iTerm" to set thefile to choose folder with prompt "Choose a folder to place received files in"' -e "do shell script (\"echo \"&(quoted form of POSIX path of thefile as Unicode text)&\"\")"`
elseFILE=`osascript -e 'tell application "iTerm2" to activate' -e 'tell application "iTerm2" to set thefile to choose folder with prompt "Choose a folder to place received files in"' -e "do shell script (\"echo \"&(quoted form of POSIX path of thefile as Unicode text)&\"\")"`
fiif [[ $FILE = "" ]]; thenecho Cancelled.# Send ZModem cancelecho -e \\x18\\x18\\x18\\x18\\x18sleep 1echoecho \# Cancelled transfer
elsecd "$FILE"/usr/local/bin/rz -E -e -bsleep 1echoechoecho \# Sent \-\> $FILE
fi

iterm2-send-zmodem.sh

#!/bin/bash
# Author: Matt Mastracci (matthew@mastracci.com)
# AppleScript from http://stackoverflow.com/questions/4309087/cancel-button-on-osascript-in-a-bash-script
# licensed under cc-wiki with attribution required
# Remainder of script public domainosascript -e 'tell application "iTerm2" to version' > /dev/null 2>&1 && NAME=iTerm2 || NAME=iTerm
if [[ $NAME = "iTerm" ]]; thenFILE=`osascript -e 'tell application "iTerm" to activate' -e 'tell application "iTerm" to set thefile to choose file with prompt "Choose a file to send"' -e "do shell script (\"echo \"&(quoted form of POSIX path of thefile as Unicode text)&\"\")"`
elseFILE=`osascript -e 'tell application "iTerm2" to activate' -e 'tell application "iTerm2" to set thefile to choose file with prompt "Choose a file to send"' -e "do shell script (\"echo \"&(quoted form of POSIX path of thefile as Unicode text)&\"\")"`
fi
if [[ $FILE = "" ]]; thenecho Cancelled.# Send ZModem cancelecho -e \\x18\\x18\\x18\\x18\\x18sleep 1echoecho \# Cancelled transfer
else/usr/local/bin/sz "$FILE" -e -bsleep 1echoecho \# Received $FILE
fi

step3: 建立软连接

sudo ln -s /opt/homebrew/bin/sz /usr/local/bin/sz
sudo ln -s /opt/homebrew/bin/rz /usr/local/bin/rz

step4: 配置

item2-preferences-profiles-advanced-triggers

配置信息:

rz配置参数
rz waiting to receive.\*\*B0100
Run Silent Coprocess
/usr/local/bin/iterm2-send-zmodem.sh
✅
✅sz配置参数\*\*B00000000000000
Run Silent Coprocess
/usr/local/bin/iterm2-recv-zmodem.sh
✅
✅

http://www.lryc.cn/news/220447.html

相关文章:

  • 使用Matplotlib绘画3D图时运行不出结果,也不报错,图片是空白 !!
  • Matlab函数——find
  • mac安装python3
  • 【星海出品】VUE(一)
  • Stable Diffusion 的提示词使用技巧
  • Hook函数
  • USB简介系列-01
  • 算法小白的心得笔记:比较小数点后五位,而不会受到浮点数精度问题的影响。
  • 11月起,33个省份纳入数电票开票试点范围内,发票无纸化已是大势所趋!
  • NLP之Bert多分类实现案例(数据获取与处理)
  • matlab中的mapminmax函数初步理解和应用
  • svc和ingress的关系
  • 可以使用以下代码对数据库查询结果进行分组统计
  • win10提示mfc100u.dll丢失的解决方法,快速解决dll问题
  • zookeeper:启动原理
  • kafka问题汇总
  • C#使用随机数模拟英雄联盟S13瑞士轮比赛
  • RabbitMQ(高级特性)利用限流实现不公平分发
  • 3 网络协议入门
  • 【星海出品】VUE(五)
  • 项目实战之安装依赖npm install
  • Java之图书管理系统
  • 用「埋点」记录自己,不妄过一生
  • 运维知识点-Docker从小白到入土
  • 基于DevEco Studio的OpenHarmony应用原子化服务(元服务)入门教程
  • MySQL和Java程序建立连接的底层原理(JDBC),一个SQL语句是如何执行的呢?
  • uniapp踩坑之项目:uniapp数字键盘组件—APP端
  • 聊一聊GPT——让我们的写作和翻译更高效
  • 413 (Payload Too Large) 2023最新版解决方法
  • uboot启动linux kernel的流程