If one has a compressed archive with thousands files in it, what is the optimal way to delete/replace files in it from a shell script?
tar does not support replacing files in archive, and "decompress and compress again" way for replacing a single file in a large archive doesn't seem an optimal way.
xz as it seems doesn't support this option either.
7z is also not suitable for this task (man page for 7z doesn't recommend to use it for compressing individual files, only for compressing tar files, due to issues with preserving file owner/group info).
pax also doesn't have options for deleting/replacing files in archive.
Is there a common way on Linux for creating such archives from command line?
I think you should seriously consider using ZFS or any other advanced file system. This will allow you to
ZFS runs perfectly under Solaris, but there is already a stable port for Linux.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With