技术解析

xz 解压文件竟然没有进度提示, orz,大佬们都是用什么压缩和解压文件的
0
2021-06-21 09:14:38
idczone
xz -help
Usage: xz [OPTION]... [FILE]...
Compress or decompress FILEs in the .xz format.

-z, --compress force compression
-d, --decompress force decompression
-t, --test test compressed file integrity
-l, --list list information about .xz files
-k, --keep keep (don't delete) input files
-f, --force force overwrite of output file and (de)compress links
-c, --stdout write to standard output and don't delete input files
-0 ... -9 compression preset; default is 6; take compressor *and*
decompressor memory usage into account before using 7-9!
-e, --extreme try to improve compression ratio by using more CPU time;
does not affect decompressor memory requirements
-q, --quiet suppress warnings; specify twice to suppress errors too
-v, --verbose be verbose; specify twice for even more verbose
-h, --help display this short help and exit
-H, --long-help display the long help (lists also the advanced options)
-V, --version display the version number and exit

With no FILE, or when FILE is -, read standard input.
可以考虑用 tqdm ( https://tqdm.github.io/)
比如
seq 1000000 | tqdm --bytes | xz - | tqdm --bytes --position 2 > /dev/null
6.57MB [00:11, 598kB/s]
183kB [00:11, 16.0kB/s]
前者是未压缩的输入,后者是已压缩的输出。

tar -xJvf
需要更进一步的进度的话可以看看 https://www.gnu.org/software/tar/manual/html_section/tar_25.html

xz 不是有进度条的吗,加一个 -v 参数。

多谢了

谢谢啦

哇,多谢大佬的指教,英文渣渣,加了一个大写的 V

可以考虑一下 pv

数据地带为您的网站提供全球顶级IDC资源
在线咨询
专属客服