copying a symlink to a target file using cp -t

Published: 8/11/2019
copying a symlink to a target file using cp -t
Source: UNIX.STACKEXCHANGE.COM

I have a symlink to a file and i need to copy the original file to a different directory and have a new name there. Right now am able to copy it to a different directory by using readlink -ne my_symlink | xargs -0 cp -t /tmp/ But i am not able to give a new name in the destination directory. Basically i am looking for a command that could look like readlink -ne base.txt | xargs -0 cp -t /tmp/newna

Read more
Related news
Comment
FACEBOOK