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

博客围绕Red Hat Enterprise Linux 5环境展开,提出使用cp命令复制软链接时,需将其作为链接而非所链接文件复制的问题,并给出解决方案,包括复制包含软链接的整个目录以及仅复制单个链接的方法。
2078

被折叠的 条评论
为什么被折叠?



