tar
解压:tar xvf fileName.tar
压缩:tar cvf fileName.tar directoryName
rar
1、安装rar
下载RAR https://www.rarlab.com/download.htm安装包(建议下载RAR 5.80 beta 1 for macOS (64 bit)
否则安装了可能无法使用), cd 到Downloads目录解压下载的.tar.gz
taodeMacBook-Pro:Downloads tao$ tar zxvf rarlinux-x64-5.8.b1.tar.gz
cd 到解压后到rar目录下只需下面命令进行安装
taodeMacBook-Pro:rar tao$ sudo install -c -o $USER rar /usr/local/bin
2、安装unrar
# 或者使用 sudo install -c -o $USER unrar /usr/local/bin 进行安装
taodeMacBook-Pro:Desktop tao$ brew install unrar
==> Downloading https://homebrew.bintray.com/bottles/unrar-5.7.5.mojave.bottle.t
==> Downloading from https://akamai.bintray.com/8d/8d30a945be9a3b5a668d3c558f40d
######################################################################## 100.0%
==> Pouring unrar-5.7.5.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/unrar/5.7.5: 6 files, 499.6KB
解压 :unrar x fileName.rar
压缩: rar a fileName.rar directoryName
.gz
解压1:gunzip fileName.gz
解压2:gzip -d fileName.gz
压缩:gzip FileName
.tar.gz 和 .tgz
解压:tar zxvf fileName.tar.gz
压缩:tar zcvf fileName.tar.gz directoryName
.bz2
解压1:bzip2 -d fileName.bz2
解压2:bunzip2 fileName.bz2
压缩: bzip2 -z fileName
.tar.bz2
解压:tar jxvf fileName.tar.bz2
压缩:tar jcvf fileName.tar.bz2 directoryName
.bz
解压1:bzip2 -d fileName.bz
解压2:bunzip2 fileName.bz
.tar.bz
解压:tar jxvf fileName.tar.bz
.Z
解压:uncompress fileName.Z
压缩:compress fileName
.tar.Z
解压:tar Zxvf fileName.tar.Z
压缩:tar Zcvf fileName.tar.Z directoryName
.zip
解压:unzip fileName.zip
压缩:zip fileName.zip DirName
.lha
解压:lha -e fileName.lha
压缩:lha -a fileName.lha fileName
.rpm
解包:rpm2cpio fileName.rpm | cpio -div
.deb
解包:ar p fileName.deb data.tar.gz | tar zxf -
网友评论