linux 系统tar文件压缩打包命令

实验环境:Centos7.* 64位,最小化安装版。长时间不解压缩,命令就会忘记,给自己留个记录,没事来看看。

linux 系统tar文件压缩打包命令linux 系统tar文件压缩打包命令

打包成tar.gz格式压缩包

# tar -zcvf renwolesshel.tar.gz /renwolesshel

解压tar.gz格式压缩包

# tar zxvf renwolesshel.tar.gz

打包成tar.bz2格式压缩包

# tar -jcvf renwolesshel.tar.bz2 /renwolesshel

解压tar.bz2格式的压缩包

# tar jxvf renwolesshel.tar.bz2

压缩成zip格式

# zip -q -r renwolesshel.zip renwolesshel/

解压zip格式的压缩包

# unzip renwolesshel.zip

暂时先这些吧,后期遇到了再添加。

原文来自:https://www.linuxprobe.com/linux-tar.html

猜你喜欢

转载自my.oschina.net/ssdlinux/blog/1803450