In order to make the unpacking process as robust as possible I would like for a tar(.gz) archive to be unpacked in a certain order so that a power outage or such is less likely to cause harm.
As an example, I have the following directory tree:
.
├── b
└── foo
├── a
└── c
and I want them to be unpacked in the order
./foo/a
./b
./foo/c
I plan on using GNU tar
with the --format=oldgnu
option (to keep compatible with Busybox' tar
) in bash
. I would be open to using other tools as well, the format is necessary though.
Using A
/--append
this should be possible (or so I thought). But somehow I failed in all my attempts so far, e.g.:
$ tar c ./foo/a | tar A ./b > test.tar tar: Options '-Aru' are incompatible with '-f -'
$ tar Af <(tar c ./foo/a) ./b > test.tar tar: Cannot backspace archive file; it may be unreadable without -i tar: /dev/fd/63: Cannot write: Bad file descriptor tar: Error is not recoverable: exiting now
(I tested without the format option and without the ./foo/c
file at first.)