Browse - Computer Tips - What is a "tar pipe" ?

Date: 2007nov2
OS: Linux
Level: Intermediate

Q.  What is a "tar pipe" ?

A.  It's a construct for copying directory trees.
In the Linux/Unix shell run two tar commands, one creating and the other
extracting in different folders like this:

(cd /src/dir; tar -cf - stuff) | (cd /dst/dir; tar -xvf -)
Unless you are trying to be fancy, might as well just using cp with the -R -p options. It was used more in the past to preserve file mode, ownership and date stamps but now the -p option for cp does that.