How good is the compression rate of gzip when you use tar with the gzip option? I am pretty amazed that a 1 GB file was reduced to 1019K. This is what I did.
tar -cvf tar_test.tar.gz -T /list_of_files
ls -hl
-rw-r-----. 1 owner group 19 Jul 23 16:00 list_of_files
-rw-r-----. 1 owner group 1019K Sep 19 02:17 tar_test.tar.gz
The compression efficiency really depends on what is being compressed, in general high compression ratios of 90% plus seem to be available on large text files. But most compression utilities tend to give only a few percent when compressing binaries or populated database tables.
I dont think I've seen the 99.9% that you've achieved here, but I have seen 90% regularly on text files and I'm sure that on one occasion a few years ago an Oracle Database that I was migrating reduced by a huge amount just can't rmember by how much.
From the example above, I'm not sure how you compressed the file, are you sure that everything is there?
I checked the GNU version of tar and the only way to auto compress using file extension magic is to use the "a" flag:
You can also let GNU tar select the compression program based on the
suffix of the archive file name. This is done using �--auto-compress' (�-a')
command line option. For example, the following invocation will use bzip2
for compression:
$ tar caf archive.tar.bz2 .
I wanted to test further but I am in the middle of making a new "how to use code tags and format posts video" for unix.com, and have been having some issues with rendering today; so my entire day has been wasted rendering video. But the good news is that "eventually" we will have a new "how to use code tags" video
Sorry, if my post(s) on this GNU tar issue are not fully tested, as I have a lot of balls up in the air right now, video, code changes, mobile CSS for the site and more..... but I did finally take a closer look at the GNU tar PDF while video was rendering.
Totally depends on what you are compressing. If it's plain text you would be able to compress by the size you have mentioned. Try video it would be another story altogether.