Ryan
Ryan

Reputation: 133

Determine .tar.gz filesize based on directory

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?

Upvotes: 1

Views: 117

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798566

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.

Upvotes: 1

Related Questions