Not sure if the title is clear what I want.
This is more out of curiosity.
Is it possible to add a file to tar.bz2 archive without first bunzip2ing it to disk ?
If I dont make sense, read on...
I have a store.tar.bz2 archive and want to add a file to it, call it file
I know I can bunzip it to have a tar file, then add the file with the tar -rf command and then bzip2 again, but without extracting to disk, using pipes, is it possible ?
Best I got was:
Code:
bzcat store.tar.bz2 | tar r - file | bzip2 - store2.tar.bz2
But that fails
Code:
tar: Options `-Aru' are incompatible with `-f -'
Try `tar --help' or `tar --usage' for more information.
bzcat: Can't open input file store.tar.bz2: No such file or directory.
bzip2: Can't open input file store2.tar.bz2: No such file or directory.
No big deal, just curious.