macOS命令行unar解压7z文件(3)
unar 1 是 The Unarchiver 提供的命令行解压工具,可以在各个系统里运行。
-
先下载
unarMac.zip文件,解压后有两个文件:unar和lsar -
将
unar和lsar移动到路径/Applications/The Unarchiver.app/Contents/macOS/,并添加到系统 PATH 中:
echo 'export PATH="/Applications/The Unarchiver.app/Contents/macOS/:$PATH"' >> ~/.zshrc
source ~/.zshrc
- 说明:
unar:
unar v1.10.1 (May 19 2016), a tool for extracting the contents of archive files.
Usage: unar [options] archive [files ...]
lsar:
lsar v1.10.1 (May 19 2016), a tool for listing the contents of archive files.
Usage: lsar [options] archive [files ...]