I am currently compressing a list of files from a directory in the following format:
tar -cvjf test_1.tar.gz -T test_1.lst --no-recursion
The above command will compress only those files mentioned in the list. I am doing this because this list is generated such that it fits a DVD. However, during compression the compression rate decreases the estimated file size and there is abundant space left in the DVD. This is something like a Knapsack algorithm.
I would like to estimate the compressed file size and add some more files to the list. I found that it is possible to estimate file size using the following command:
tar -cjf - Folder/ | wc -c
This command does not take a list parameter. Is there a way to estimate compressed file size? I am also looking into options like perl scripts etc.