LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to copy soft link (https://www.linuxquestions.org/questions/linux-software-2/how-to-copy-soft-link-372452/)

hongxing 10-12-2005 08:14 PM

how to copy soft link
 
when I copy use cp, it says cannot copy soft link file.
how to copy it ?

mherring02 10-12-2005 08:29 PM

I'm guessing it is an issue of permissions. Check to see that you have write access to the directory where you are trying to put the link.

(I just tried copying a link where I have permissions and it works fine)

hongxing 10-12-2005 08:43 PM

I remember their is an option of cp command, but not sure which one

mherring02 10-12-2005 08:54 PM

Your reply does not seem to relate to mine....

try "man cp"---but I have never seen an option for copying links. Again it worked for me by just using: "cp <linkname> <directory>"

mayankmehta83 02-24-2010 07:14 AM

use "-d" switch with cp to copy links
 
% cp --help | grep link;
-d, --no-dereference never follow symbolic links
...

mayankmehta83 02-24-2010 07:14 AM

% cp --help | grep link
-d, --no-dereference never follow symbolic links


All times are GMT -5. The time now is 03:59 AM.