How to specify level of compression when using tar

https://superuser.com/questions/305128/how-to-specify-level-of-compression-when-using-tar-zcvf

$ tar cv /path/to/directory | gzip --best > file.tar.gz

When calling tar, option f states that the output is a file. Setting it to - (stdout) makes tar
write its output to stdout which is the default behavior without both f and -. And as stated by the gzip man page, if no files are specified gzip will compress from standard input. There is no need for - in the gzip call. Option --best (equivalent to -9) sets the highest compression level. # apt-get install 7zip # dpkg -L 7zip /usr/bin/7zz ... $ 7zz Usage: 7zz <command> [<switches>...] <archive_name> [<file_names>...] [@listfile] <Commands> a : Add files to archive b : Benchmark l : List contents of archive u : Update files to archive x : eXtract files with full paths -bt : show execution time statistics -mmt[N] : set number of CPU threads -mx[N] : set compression level: -mx1 (fastest) ... -mx9 (ultra) -o{Directory} : set Output directory -p{Password} : set Password $ 7zz a -bt -mmt8 --mx9 t.7z lanczos/ $ 7zz l t.7z
posted @ 2023-01-10 08:06  Fun_with_Words  阅读(11)  评论(0编辑  收藏  举报









 张牌。