范例一:将整个 /etc 目录下的档案全部打包成为 /tmp/etc.tar

[root@linux ~]# tar -cvf /tmp/etc.tar /etc  <==仅打包,不压缩!

[root@linux ~]# tar -czvf /tmp/etc.tar.gz /etc  <==打包后,以 gzip 压缩

[root@linux ~]# tar -cjvf /tmp/etc.tar.bz2 /etc  <==打包后,以 bzip2 压缩

 

相关文章:

  • 2022-12-23
  • 2021-08-09
  • 2021-04-28
  • 2021-06-06
  • 2021-12-16
  • 2021-06-02
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-03
  • 2021-08-10
  • 2022-12-23
  • 2022-02-15
相关资源
相似解决方案