更新 brew 源
替换brew.git:
cd "$(brew --repo)" git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
|
替换homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
|
ssh login
list tcp port
lsof -nP | grep LISTEN lsof -nP -iTCP:15111 | grep LISTEN
|
访问移动硬盘
/Volumes/workUse/primecoinMainData_mac
|
虚拟化
sysctl kern.hv_support
返回1 说明 VT.x VT.d 都支持 kern.hv_support: 1
|
查看依赖库
otool -L /Applications/Primecoin-Qt.app/Contents/MacOS/Primecoin-Qt
光标移动
ctrl+a //移到行首
ctrl+e //移到行尾
szh启动时执行用户的bash_profile
在.zshrc文件中添加命令source .bash_profile
删除一行
文件校验sha256,md5
openssl dgst -sha256 /path/to/file openssl sha1 /path/to/file openssl md5 /path/to/file
|
查看端口
netstat -an | grep 3306
使用lsof命令 lsof -i:80 -i参数表示网络链接,:80指明端口号,该命令会同时列出PID,方便kill
查看所有进程监听的端口 sudo lsof -i -P | grep -i "listen"
|