| Linux: Copy Directory Structure Only |
|
|
|
| Tech Notes - Linux |
| Written by Rick |
| Friday, 11 September 2009 18:00 |
|
I ran across the need to copy a large directory structure to a remote machine this week. I just needed the directory structure, not the files. There is a way to do this locally using the cp command with the --parent switch, though I haven't tried it yet. Doing it remotely requires rsync; rsync -av --include '*/' --exclude '*' source-dir dest-dir Works like a charm. |





