Another way to copy directory hierarchies is to use the tar utility, described in section 6.3.7. The following sequence of commands copies a structure from the source directory to the destination directory:
% cd source_dir; tar cf - . | (cd destination_dir; tar xfBp -)
-" is used for the name of the tar file (argument to the
f option) so that tar writes to the standard output or reads from the standard input, as appropriate.