这是一个相当理论的问题,但是是否有一些(不太晦涩的)增量存档格式允许>>
使用简单的附加到现有存档或连接多个存档cat
?
archive file1 file2 > backup
archive file3 file4 >> backup
cat first.archive second.archive > full.archive
我最初想到的是cpio
。但它TRAILER!!!
在初始存档的末尾使用特殊标记,因此如果连接两个 CPIO 存档,则永远不会读取第二个存档。除非我错过了一些选择?
答案1
男人柏油:
-A, --catenate, --concatenate
Append archive to the end of another archive. The arguments are
treated as the names of archives to append. All archives must
be of the same format as the archive they are appended to, oth‐
erwise the resulting archive might be unusable with non-GNU
implementations of tar. Notice also that when more than one ar‐
chive is given, the members from archives other than the first
one will be accessible in the resulting archive only if using
the -i (--ignore-zeros) option.
Compressed archives cannot be concatenated.
答案2
不是确切地我一直在寻找什么,但删除 280 字节cpio
预告片以允许存档串联是相当简单的:
find file1 file2 | cpio -o > part1.cpio
find file3 file4 | cpio -o > part2.cpio
head -c-280 part1.cpio | cat - part2.cpio > full.cpio
我仍然想知道是否有一些存档文件格式不是使用拖车块。