How do I copy a symbolic link from one directory to another?
ls -ls
file1.txt
file2.txt
files -> /mnt/iscsi-nfs-share/faulttracker-files
what I'm looking to do is copy files symbolic link into another directory?
cp files /var/copylinktohere/
the above results in cp: omitting directory `files'
Use the -d
option:
cp -d files /var/copylinktohere/
From man cp
:
-d same as --no-dereference --preserve=link
--no-dereference
never follow symbolic links