I have thousands of uncompressed tar files, which add up to almost 1 TB of data. Now i want to modify one specific string within some of the tar files.
Can I do this directly without extracting the tar file, e.g. with sed? Of course I do not want to get corrupted tar files.
Details:
The string I want to modify is 4 characters long. Can I replace it with another 4 character string? The specification of a tar file seems to contain a checksum only for the header of each file contained in the tar file, and the length of each file, so replacing 4 characters within a file contained in the tar file with other 4 characters should be fine, right?
Can I even replace the 4 character string with a 6 character string? There seems to be some padding within tar files, so what is the probability of getting a corrupt tar file when adding 2 characters? How well does extraction still work for such a corrupted tar file?
I do not have nested tar files, so this negative answer does not apply to my situation.