New answers tagged

3

With zsh, using process substitution and its tee-like behaviour when you redirect a file descriptor several times: zcat file.tar.gz > >(cd /media/disk1 && tar xf -) > >(cd /media/disk2 && tar xf -) With other shells with support for process substitution (ksh, bash): { zcat file.tar.gz 4>&- | tee >({ cd /media/...


0

You can use zcat to extract it to stdout, then tee to fork to two different files, then tar them. zcat bigfile.tar.gz | tee >(tar -xC /path/to/first/) | tar -xC path/to/second It will extract your bigfile to "first" and "second" paths. Can do it with gunzip -c too: gunzip -c bigfile.tar.gz | tee >(tar -xC /path/to/first/) | tar -xC path/to/second


1

GNU Parallel spends 2-10 ms overhead per job. It can be lowered a bit by using -u, but that means you may get output from different jobs mixed. GNU Parallel is not ideal if your jobs are in the ms range and runtime matters: The overhead will often be too big. You can spread the overhead to multiple cores by running multiple GNU Parallels: seq 5000 | ...


Top 50 recent answers are included