日本免费全黄少妇一区二区三区-高清无码一区二区三区四区-欧美中文字幕日韩在线观看-国产福利诱惑在线网站-国产中文字幕一区在线-亚洲欧美精品日韩一区-久久国产精品国产精品国产-国产精久久久久久一区二区三区-欧美亚洲国产精品久久久久

linux 最快的壓縮命令 linux壓縮命令( 二 )

zcat:不解壓顯示文件按內(nèi)容
[root@ym test]# zcat 1test.sh.gz #!/bin/shseq 1 5 > /tmp/test.log#exec < /tmp/test.logcat /tmp/test.logwhile read linedoecho $linedoneecho "ok" bzip2
[root@ym ~]# bzip2 -h-h --help打印幫助信息-d --decompress強制解壓文件-z --compress強制壓縮文件-k --keep保留源文件不刪除文件-f --force覆蓋輸出文件-t --test測試壓縮文件-c --stdout輸出到標(biāo)準(zhǔn)輸出-q --quiet不顯示警告信息-v --verbose顯示指令執(zhí)行過程-L --license顯示版本-V --version顯示版本信息-s --small使用最小內(nèi)存--fast-1 快速壓縮,壓縮比例最低--best-9 壓縮比例最高,壓縮速度慢[root@ym test]# bzip2 -z file # 壓縮文件[root@ym test]# ls1test.sh2test.shbigfilefile.bz2passwdtest.sh[root@ym test]# bzip2 -d file.bz2 #加壓文件[root@ym test]# bzip2 -k file # 保留源文件并壓縮[root@ym test]# ls1test.sh2test.shbigfilefilefile.bz2passwdtest.sh# 使用 -f 壓縮文件會覆蓋目錄下同名的文件[root@ym test2]# lsfilefile.bz2[root@ym test2]# bzip2 -f file[root@ym test2]# lsfile.bz2# -c 使用管道符重定向到一個文件[root@ym test2]# bzip2 -c file > file.bz2[root@ym test2]# lsfilefile.bz2 bzcat:不解壓顯示文件內(nèi)容
[root@ym test2]# bzcat file.bz2 hello shellhello python xz
[root@ym ~]# xz --helpUsage: xz [OPTION]... [FILE]...-z, --compress壓縮文件-d, --decompress解壓文件-t, --test測試壓縮文件-l, --list列出信息關(guān)于 xz 文件-k, --keep保留原文不刪除-f, --force覆蓋解壓-c, --stdout將信息輸出-0 ... -9指定壓縮級別-e, --extreme使用大量 CPU 快速壓縮-T, --threads=NUM使用多線程壓縮-q, --quiet不顯示警告信息-v, --verbose顯示執(zhí)行過程-h, --help查看幫助-H, --long-help更詳細幫助信息-V, --version像是版本信息[root@ym test2]# xz -z file # -z 壓縮文件 file 位 file.xz[root@ym test2]# lsfile.bz2file.xz# -d 解壓 file.xz 位 file[root@ym test2]# xz -d file.xz [root@ym test2]# lsfilefile.bz2# -f 覆蓋源文件壓縮[root@ym test2]# xz -f file[root@ym test2]# lsfile.bz2file.xz# -l 顯示壓縮文件內(nèi)容[root@ym test2]# xz -l file.xzStrmsBlocksCompressed UncompressedRatioCheckFilename1184 B26 B3.231CRC64file.xz# -e 會消耗大量 cpu 壓縮文件[root@ym test2]# xz -e file[root@ym test2]# lsfile.bz2.xzfile.xz# -T 指定使用的線程數(shù)解壓[root@ym test2]# xz -d file.xz[root@ym test2]# xz -T 4 file[root@ym test2]# lsfile.bz2.xzfile.xz# -C 壓縮文件[root@ym test2]# xz -d file.xz[root@ym test2]# xz -c file > file.xz[root@ym test2]# lsfilefile.bz2.xzfile.xz[root@ym test2]# xz -l file.xzStrmsBlocksCompressed UncompressedRatioCheckFilename1184 B26 B3.231CRC64file.xz xzcat:不顯示解壓的前提下查看文件內(nèi)容
[root@ym test2]# xzcat file.xzhello shellhello python zip
-q:不顯示執(zhí)行過程-v:顯示執(zhí)行過程-r:遞歸處理,將指定目錄下的所有文件和子目錄一并處理-d:從壓縮文件中刪除指定文件[root@ym test2]# zip file.zip fileadding: file (deflated 12%)[root@ym test2]# lsfilefile.bz2.xzfile.xzfile.zip# -q 不顯示壓縮過程[root@ym test2]# zip -q file1.zip file[root@ym test2]# lsfilefile1.zipfile.bz2.xzfile.xzfile.zip# -r 遞歸壓縮目錄問價 zip -r test test.zipzip error: Nothing to do! (try: zip -r test . -i test.zip)[root@ym ~]# zip -r abc.zip testadding: test/ (stored 0%)adding: test/1test.sh (deflated 29%)adding: test/2test.sh (deflated 31%)adding: test/bigfile (deflated 100%)adding: test/passwd (deflated 61%)adding: test/test.sh (deflated 14%)adding: test/file (deflated 61%)adding: test/file.bz2 (stored 0%)# -v 顯示壓縮過程[root@ym test2]# zip -rv test.zip testadding: test/ (in=0) (out=0) (stored 0%)adding: test/1test.sh (in=122) (out=87) (deflated 29%)adding: test/2test.sh (in=203) (out=141) (deflated 31%)adding: test/bigfile .(in=10485760) (out=10190) (deflated 100%)adding: test/file (in=2660) (out=1032) (deflated 61%)adding: test/passwd(in=2660) (out=1032) (deflated 61%)adding: test/test.sh(in=37) (out=32) (deflated 14%)total bytes=10491442, compressed=12514 -> 100% savings

推薦閱讀