itfeng813

Linux服务器常用解压缩命令tar/zip

1.zip类型

  将多个文件或目录压缩成 txt.zip文件:

   zip -r txt.zip 1.txt 2.txt dir3/ 

  解压到当前目录:

   unzip txt.zip 

  将txt.zip文件解压到指定目录:

   unzip -d tardir/ txt.zip 

2.tar类型

  压缩一个或多个文件或者目录:

   tar -zcvf txt.tar.gz 1.txt txt/ 

  解压到当前目录:

   tar -zxvf txt.tar.gz  

  解压到指定目录:

   tar -zxvf txt.tar.gz -C tardir/ 

  

分类:

技术点:

相关文章:

  • 2022-01-06
  • 2021-09-20
  • 2022-12-23
  • 2021-09-08
  • 2021-10-21
  • 2022-12-23
  • 2021-08-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2021-09-25
相关资源
相似解决方案