Sergey Poznyakoff wrote:
Tim Kientzle <[EMAIL PROTECTED]> ha escrit:
This approach is necessarily a little slower than the
GNU tar --concatenate option, but it gives you a lot
more flexibility. I thought the folks on this list
might find the approach worth considering.
It is a very interesting approach. What if a regular (non-archive) file
has a name beginning with @? How do you handle this case?
Same as for filenames starting with "-":
tar -cvf - @archive ./@file ./--extract
The alternative would have been to introduce another
option that worked like the -C option; that would
give you syntax along the lines of:
tar -cvf - file1 --entries-from=archive1 file2 --entries-from=archive
The most interesting implication of this design
is that it leads naturally to a --include option
that specifies file patterns to be retained:
# Include only one subdir from archive2.tgz:
tar -czf archive.tgz --include=subdir/ @archive2.tgz
Cheers,
Tim