Linux压缩解压的几个命令

该Linux解压是在Ubuntu14LTS下进行的,主要是几个常见的命令

  1. .tar

    解包:tar xvf FileName.tar

    打包:tar cvf FileName.tar DirName

    PS:打包和压缩是两个概念

  2. .gz

    解压1:gunzip FileName.gz
    解压2:gzip -d FileName.gz
    压缩:gzip FileName

    .tar.gz.tgz
    解压:tar zxvf FileName.tar.gz
    压缩:tar zcvf FileName.tar.gz DirName

  3. .bz2

    解压1:bzip2 -d FileName.bz2
    解压2:bunzip2 FileName.bz2
    压缩: bzip2 -z FileName

    .tar.bz2
    解压:tar jxvf FileName.tar.bz2
    压缩:tar jcvf FileName.tar.bz2 DirName

  4. .zip

    解压:unzip FileName.zip
    压缩:zip FileName.zip DirName

  5. .rar

    解压:rar x FileName.rar
    压缩:rar a FileName.rar DirName

  6. .rmp

    解包:rpm2cpio FileName.rpm | cpio -div

  7. .deb

    解包:ar p FileName.deb data.tar.gz | tar zxf -

  8. .tar .tgz .tar.gz .tar.Z .tar.bz .tar.bz2 .zip .cpio .rpm .deb .slp .arj .rar .ace .lha .lzh .lzx .lzs .arc .sda .sfx .lnx .zoo .cab .kar .cpt .pit .sit .sea

    解压:sEx x FileName.*
    压缩:sEx a FileName.* FileName

    PS:sEx只是调用相关程序,本身并无压缩、解压功能,请注意!

Comments

Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×