lucifer1997

常用压缩/解压操作

常用压缩/解压操作

1、解压:

unzip file.zip       //把zip文件解压到当前目录下

unzip -d /temp file.zip   //把zip文件解压到指定的目录下

tar –xvf file.tar      //解压 tar包到当前目录下

tar -xzvf file.tar.gz     //解压tar.gz到当前目录下

tar -xjvf file.tar.bz2    //解压 tar.bz2到当前目录下

tar –xZvf file.tar.Z     //解压tar.Z包到当前目录下

7za x file.7z -o"/temp"   //解压7z包到指定目录下

 

2、压缩:

tar -zcvf test.tar.gz ./test   //把test目录压缩成test.tar.gz

tar -cvf test.tar ./test    //把test目录压缩成test.tar

zip -r test.zip ./test      //把test目录压缩成test.zip

分类:

技术点:

相关文章:

  • 2021-09-01
  • 2021-09-14
  • 2022-02-07
  • 2021-11-05
  • 2022-02-09
  • 2022-12-23
  • 2021-09-20
  • 2021-11-07
猜你喜欢
  • 2021-12-23
  • 2022-02-07
  • 2021-11-09
  • 2021-09-01
  • 2021-11-27
  • 2021-11-29
  • 2021-12-07
相关资源
相似解决方案