Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Long running tar command



On Fri, Sep 27, 2024 at 6:38 PM Dominik Vogt <dominik.vogt@xxxxxx> wrote:
>
>   tar c -v -f >(tee dest.tar | md5sum > dest.md5) /data > dest.list
>
> I'd also like to use the --verify tar option, but that does not
> work because ">(...)" is not a seekable file descriptor.  Any idea
> how to get around this limitation?

The --verify pass won't happen until the output file is fully written,
so is it really slower to run a second tar command to do that?

That said, if you're on Linux / using modern GNU tools, you could do:

: assure dest.tar exists and is empty >! dest.tar
tar c -v -f --verify dest.tar /data > dest.list & tail -f --pid=$!
dest.tar | md5sum > dest.md5




Messages sorted by: Reverse Date, Date, Thread, Author