-1

Is there command or UNIX utility that can take tree output like:

.
`-- First
    |-- data1
    |   `-- some_file -> /tmp/some_file
    `-- data2

and create the same tree structure in another place?

Roman Kaganovich
  • 618
  • 2
  • 6
  • 27

1 Answers1

1

From Tar only the Directory structure

find First -type d -print0 | xargs -0 tar cf dir_template.tar --no-recursion

Where First is the top level directory that you want to save the structure of.

Copy dir_template.tar to your target destination, then:

tar xf dir_template.tar
Jeff Breadner
  • 1,366
  • 9
  • 19