14 ms·
> How would it be easier than putting it at the front? Have you ever wondered why `tar` is the Tape Archive? Tape. Magnetic recording tape. You stream data
by McGlockenshire 1y ago
> How would it be easier than putting it at the front?
Have you ever wondered why `tar` is the Tape Archive? Tape. Magnetic recording tape. You stream data to it, and rewinding is Hard, so you put the list of files you just dealt with at the very end. This now-obsolete hardware expectation touches us decades later.
- jclulow 1y agotar streams don't have an index at all, actually, they're just a series of header blocks and data blocks. Some backup software built on top may include a catalog of some kind inside the tar stream itself, of course, and may choose to do so as the last entry.
- ahoka 1y agoIIRC, the original TAR format was just writing the 'struct stat' from sys/stat.h, followed by the file contents for each file.
- charcircuit 1y agoBut new file formats being developed are most likely not going to be designed to be used with tapes. If you want to avoid rewinds you can write a new concatenated version of the files. This also allows you to keep the original in case you need it.