Saturday | 23 NOV 2024
[ previous ]
[ next ]

Testing Tar

Title:
Date: 2022-09-18
Tags:  

A little bit of testing how well tar compresses things. I am compressing my blog which is 450mb. It is a mix of mostly text, some images, and most of the size comes from binary files and a debian state file.

tar

tar cvf folder.tar folder --exclude .git 

This took 4.25 seconds and created a tar file of 410mb.

gzip

tar czvf folder.tar.gz folder --exclude .git 

This took 28.70 seconds and created a tar file of 199mb.

bzip

tar cjvf folder.tar.bz folder --exclude .git

This took 60.85 seconds and created a tar file of 188mb.

gzip is definitely worth it but it doesn't look like bzip is worth it in most cases.