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.

1

cp -d src dst

From the man page:

   -d     same as --no-dereference --preserve=links

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.