|
From: | Tim Kientzle |
Subject: | Re: [Bug-tar] Problem with multiple archives and --concatenate |
Date: | Tue, 19 Aug 2008 13:27:14 -0700 |
User-agent: | Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 |
Sergey Poznyakoff wrote:
Tim Kientzle <address@hidden> 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
[Prev in Thread] | Current Thread | [Next in Thread] |