作者简介
李先生(Lemon),高级运维工程师(自称),SRE专家(目标),梦想在35岁买一辆保时捷。喜欢钻研底层技术,认为底层基础才是王道。一切新技术都离不开操作系统(CPU、内存、磁盘)、网络等。坚持输入输出,记录自己学习的点滴,在平凡中坚持前行,总有一天会遇见不一样的自己。公众号:运维汪(ID:Leeeee_Li)。
tar -zcvf too.tar.gz too
#.tar.gz tar -zxvf too.tar.gz #.tar.gz2 tar -jxvf too.tar.gz2
3)排除某个目录打包
tar -czvf too.tar.gz --exclude=too/logs too
tar -zcf api3.0_`date +%Y%m%d%H%M%S`.tar.gz -C /usr/local/tomcat/webapps api3.0
gzip filename
gzip -d filename # 打包的文件会被删除
bzip2 examplefile or bzip2 -s examplefile
bzip2 -d examplefile.bz2 or bunzip2 examplefile.bz2
3)详细说明
bzip2 -v examplefile
lzma -c --stdout examplefile> examplefile.lzma
lzma -d --stdout examplefile.lzma >examplefile
xz examplefile
xz -d examplefile
pax -wf examplefile.tar examplefile pax -wf examplefile.tar.gz examplefile
pax -r <examplefile.tar
pax -f examplefile.tar
wget https://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/7/x86_64/Packages/p/p7zip-16.02-10.el7.x86_64.rpm wget https://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/7/x86_64/Packages/p/p7zip-plugins-16.02-10.el7.x86_64.rpm sudo rpm -U --quiet p7zip-16.02-10.el7.x86_64.rpm sudo rpm -U --quiet p7zip-plugins-16.02-10.el7.x86_64.rpm
7z a examplefile.7z examplefile
7z a examplefile.7z examplefile
yum -y install sharutils
shar examplefile > examplefile.shar
unshar examplefile.shar
ls | cpio -ov >/home/username/backup.cpio
cpio -idv <backup.cpio
ar cvsr examplefile.a examplefile
ar -xv examplefile.a
dd if=/media/dvd of=/home/username/filename.iso
原文:https://www.cnblogs.com/lemon-le/p/14268584.html