xz 解压文件竟然没有进度提示, orz,大佬们都是用什么压缩和解压文件的

2019-03-24 01:37:08 +08:00
 opensail
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.
4050 次点击
所在节点    Linux
7 条回复
Yorwba
2019-03-24 03:12:22 +08:00
可以考虑用 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]

前者是未压缩的输入,后者是已压缩的输出。
quinoa42
2019-03-24 03:54:24 +08:00
tar -xJvf
需要更进一步的进度的话可以看看 https://www.gnu.org/software/tar/manual/html_section/tar_25.html
Tyanboot
2019-03-24 13:36:27 +08:00
xz 不是有进度条的吗,加一个 -v 参数。
opensail
2019-03-24 19:23:25 +08:00
@Yorwba 多谢了
opensail
2019-03-24 19:24:16 +08:00
@quinoa42 谢谢啦
opensail
2019-03-24 19:25:18 +08:00
@Tyanboot 哇,多谢大佬的指教,英文渣渣,加了一个大写的 V
lucifer9
2019-03-25 17:13:53 +08:00
可以考虑一下 pv

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/547878

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX