On 12/6/2013 4:44 PM, Paul Eggert wrote:
> Linda A. Walsh wrote:
>> What is this switch suppose to do?


This switch causes the complete file to be duplicated in the
tar archive for every name it has in the filesystem..   Otherwise,
the tar archive stores the file just once; other names
are stored as “hard link” entries in the tar archive.


On Dec 7, 2013, at 12:27 AM, Linda A. Walsh <g...@tlinx.org> wrote

> Instead of going this route with hard-links, maybe tar
> might pre-process the directory tree into its own memory,
> or as a .dir-<some-dt-stamp> at the root of the tree just
> for things like hard links; 

Pre-processing the full directory tree is a problem
when using tar for large system backups.
(Both because of memory space and because
the scan can take a long time, so there’s a significant
chance that the file system will change in troublesome
ways before the second pass begins.)

> or)  store the inode of multi-linked files that
> would act like a symbolic-identifier
> within the tar-archive, requiring multi-linked files to
> be extracted with any "partial-extract",
> 
> or) building on the previous... create full copies of
> hard-linked files with the inode#-as-sym that can be
> replaced w/hardlinks on extraction.  That way either copy
> could be extracted separately, and only in the presence
> of both would they be hard linked.

The handling of hard linked files within tar archives
could certainly be improved.

But doing it in a way that doesn’t completely break
compatibility with other tar implementations will
be tricky.

Another option might be to attach multiple filenames
to a single entry within a pax extended attribute.

Unfortunately, I don’t think it’s practical to do
what newc cpio did and put the full copy with
the last link instead of the first.

Tim


Reply via email to