|
|
|
|
|
by Joker_vD
25 days ago
|
|
> Now, POSIX says that data blocks for a hard link “may be included” in pax archives, but the implications of this are not entirely clear. How so? If the data blocks are included, then those are the intended content of the file behind that hard link. They should overwrite the previous content of the file. > So the 512 bytes after the hard link are its data, and not the header of empty as we archived it? Yes, precisely. > How can a hard link have different contents from its previous counterpart file? Why, very simply: while the archive was being created, the file behind the two different hard links changed; the archival utility noticed it, and included the new content of the file as the content for the second hard link instead of rewinding and overwriting the original file in the archive (which would be impossible to do on a tape, you know). At least I believe that's what was the rationale for this allowance, and the intended behavior on the extraction. |
|
(I maintain several of the tar parsers mentioned in this post, which I appreciate for its clear treatment of a larger differential problem in the tar ecosystem.)