Understand that there is a steep slope between the relative ease of handling simple tar operations with the vastly more complicated aspects of the archive format. Tar's header format looks like this: field offset len ![]() ![]() Such things are easy when the tar file contains only text files because tar's record delimiters (as might occur once every 512 bytes) can just be squeezed down to a single NUL per and stripped off - without requiring you to count the occurrences as you do. ![]() There the cut fields point to fields 1,2,13 of a NUL delimited line of input. for picking apart a tar file on the fly and performing inline transformations on its component text files. Based on same, more recently I wrote these few lines of code: tar -no-recursion -c. The thing is, a tar file is just a blocked out stream file - each file within the archive is found after the one before it, and each file gets a metadata header based on a specified format.īased on that format, I once wrote shitar - which was a few lines of dd and shell scripts which could tar up a stream of block devices on the fly. And actually, in some cases this isn't so hard. Oh, but this is a question about the contents of a file within a tar file.
0 Comments
Leave a Reply. |