0

I have a symlink structure that I would like to copy from one server to another. I do not want to copy the files, just copy the symlink structure itself. I tried simply tarring the list of symlinks, but that did not produce a valid tar file. Is there a way to find all the symlinks in a given directory and then recreate them somewhere else? The reason for this is because we are moving to a new drive array and have moved the symlink structure around.

Engineer2021
  • 591
  • 7
  • 25

1 Answers1

1

cp -d src dst

From the man page:

   -d     same as --no-dereference --preserve=links
vbraun
  • 267
  • 1
  • 2