Linux常用命令集合(详细版)
1.为/etc目录依次创建gzip格式、bzip2格式和xz格式的压缩包文件
[root@localhost ~]#tar -czf etc.tar.gz /etc //创建gzip格式
[root@localhost ~]#tar -cjf etc.tar.bz2 /etc //bzip2格式
[root@localhost ~]#tar -cJf ect.tar.xz /etc//xz格式
2.创建(非压缩的)包文件my_file.tar.
[root@localhost ~]#tar -cvf my_file.tar
3.查询my_file.tar中的文件目录列表
[root@localhost ~]#tar -tf my_file.tar
本文详细介绍如何使用Linux下的tar命令创建不同格式的压缩文件,包括gzip、bzip2及xz等,并演示了如何查看压缩包内的文件列表。
1406

被折叠的 条评论
为什么被折叠?



