https://access.redhat.com/solutions/285293
SOLUTION 已验证 - 已更新 2014年七月29日01:09 -
环境
- Red Hat Enterprise Linux 5
问题
- Need to copy soft links as links and not as files they are linked to using cp command.
决议
- To copy entire directory which contains soft links.
- Copies all the links in /usr/dir to /appl/bin/test as links.
[root@host ~]# cp -prH /usr/dir /appl/bin/test
- To copy only a single link.
- **Note : -P ** in Caps
[root@host ~]# cp -P <link-name> /appl/bin/test