在Mac上操作文件

安装homebrew

https://www.jianshu.com/p/627b2d462151

1
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

安装ffmepg

1
brew install ffmpeg

安装rename

https://commandnotfound.cn/linux/1/461/rename-命令

1
brew install rename

批量改名

https://zhuanlan.zhihu.com/p/90829056

1
rename 's/.mp41/.mp4/' *

后来发现可以直接多选右键批量改名。

热插拔修复

https://www.zhihu.com/question/308406915
打开磁盘工具
打开terminal

1
2
3
diskutil list
ps aux | grep fsck
sudo pkill -f fsck

点急救,需要等很久很久

压缩解压分卷

压缩:

1
zip test.zip test.doc 

分卷:

1
zip -s 50m test.zip --out ziptest 

合卷:

1
cat ziptest.z* > test.zip 

解压:

1
unzip test.zip