Currently using following model, but one needs double the amount of disk space to restore compressed archive given one has to pipe all parts to tar before one can delete them.
$ COPYFILE_DISABLE=true tar \
--create \
--directory ~/data/dataset \
--use-compress-program lz4 \
--verbose \
. | \
split \
--bytes 10G \
--numeric-suffixes \
- \
dataset.tar.lz4.part
$ cat dataset.tar.lz4.part* | \
tar \
--extract \
--directory ~/data/dataset \
--use-compress-program lz4 \
--verbose
Is there a more efficient model where parts can be deleted FIFO (first in first out) as they are decompressed?
.gz
… fixed! – sunknudsen Feb 22 '22 at 17:18cat < "$part" || break
vscat "$part" || break
? – sunknudsen Feb 22 '22 at 18:18rm -f "$part"
would be incorrect in isolation, it would be OK here because we know from context that$part
doesn't start with-
, but I prefer showing the alwats correctrm -f -- "$part"
variant. (4) see When should I use input redirection? – Stéphane Chazelas Feb 22 '22 at 19:13