4 ms·
There are 6 slightly different variants of tar that GNU tar can unpack. In general the tar formats do not have to store the directory record, but the more recen
by dfox 3y ago
There are 6 slightly different variants of tar that GNU tar can unpack. In general the tar formats do not have to store the directory record, but the more recent can as to preserve its metadata. Also, modern tar formats generally store UID and GID as an symbolic name that might be useful on different system in contrast to numeric UID/GID. The format still is this 70's absurdity with octal-in-ASCII headers (like the “traditional” CPIO) and block aligned. Well, it is a format designed for magnetic tape.
In practice there are huge incompatibilities between non-standard SVr4 and GNU implementations, but both of them go to great lengths to detect that the format is the other one. And then there are two POSIX/SUS variants that can be easily distinguished from each other (and the SVr4/GNU variants) which are most of what you will see today.
- theamk 3y ago.. and the above is the reason why linux kernel uses cpio. Yes, the default tools suck, but the format itself is much simpler and there is only one version.
- yjftsjthsd-h 3y ago> The format still is this 70's absurdity with octal-in-ASCII headers (like the “traditional” CPIO) and block aligned. Well, it is a format designed for magnetic tape. Yeah, most of the ways tar is weird stop seeming weird when you consider the context. It can easily be appended without rewinding the tape to update metadata, it can be read/edited/fixed with just a text editor, it ends with 2 blocks of null bytes because tape doesn't tell you when you hit the end of your data like a file would. Also, I have a love-hate relationship with the "numbers as octal in ASCII" thing - on the bright side, it avoids questions of endianness;P (Edit: Well, I guess it's big endian...)