Skip to content

tar 的压缩和解压缩

Tags:

tar.gz 压缩+解压缩

tar -cvzf file.tar.gz source_folder
   c: create
   v: verbose
   z: gz format; 不然就是普通的 tar 格式
   f: file
tar -xvzf file.tar.gz -C /target/directory
   x: extract
   v: verbose
   z: gz format
   f: file

只是tar压缩+解压缩

tar -cvf myfolder.tar myfolder
tar -xvf archive.tar -C /target/directory

Leave a Reply

Your email address will not be published.