打包

作者: chen_666 | 来源:发表于2022-01-17 10:10 被阅读0次
[root@localhost ~]# tar [选项] [-f 压缩包名] 源文件或目录
选项:
-c: 打包
-f: 指定压缩包的文件名。压缩包的扩展名是用来给管理员识别格式的,所以一定
要正确指定扩展名
-v: 显示打包文件过程

[root@localhost ~]# tar -cvf anaconda-ks.cfg.tar anaconda-ks.cfg
#打包,不会压缩

[root@localhost ~]# tar -zxvf test.tar.gz -C /tmp
#解压缩到指定位置
[root@localhost ~]# tar -zxvf test.tar.gz -C /tmp test/cde
#只解压压缩包中的特定文件,到指定位置

相关文章

网友评论

      本文标题:打包

      本文链接:https://www.haomeiwen.com/subject/ymwacrtx.html