Copy Entire Directory Structure Using Tar
May 03, 2023 —
Gregg Szumowski
Sometimes you need to copy an entire directory structure to another location on the command line. Here is a quick way to do it using the tar command:
tar cf - * | ( cd /target; tar xfp -)