根据目录确定 .tar.gz 文件大小
我不确定这是否可能,但我认为是可能的;我需要找出如果我压缩特定目录的话,gzipped tar 文件可能有多大。我只想要在运行长焦油创建时的进度数字。
如果我知道完成后 tar 文件有多大,我就可以制作自己的进度数字。我知道 tar 文件进度条,但这些是交互式的,我只是想时不时地检查一下当前的百分比;有什么想法吗?
I am not sure if this is possible, but I assume it is; I need to find out how big a gzipped tar file might be if I tarred up a specific directory. I simply want progress numbers while a long tar creation is running.
If I knew how big the tar file would be once completed, I could make my own progress numbers. I am aware of tar file progress bars, but these are interactive, and I simply want to check back from time to time to see the current percentage; any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法提前确定这一点。您能做的最好的事情就是根据源文件的数量或源字节的数量来校准进度条,然后随着压缩的进行而前进。
You can't know this for certain ahead of time. The best you can do is calibrate your progress bar either on the number of source files or on the number of source bytes, then advance it as compression proceeds.