Can GNU tar add many files to an archive, deleting each one as it is added?
This is useful when there is not enough disk space to hold the entire tar archive as well as the original files.
Can GNU tar add many files to an archive, deleting each one as it is added?
This is useful when there is not enough disk space to hold the entire tar archive as well as the original files.
With GNU tar, use the option
--remove-files
.I had a task - archive files and then remove into OS installed "tar" without GNU-options.
Method:
Use "xargs"
Suppose, we are have a directory with files.
Need move all files, over the week into tar and remove it.
I do one archive (arc.tar) and added files to it. (You can create new archive every try)
Solution:
I'm not sure if you can add files to bzip2 archives without first extracting. However here is one solution that just came to my mind (giving you the pseudoish algorithm):
Now you should have a tar file containing all files individually bzip2:ed files. The question is how much overhead bzip2 adds to the individual files. This needs to be tested.