如何从目录中复制内容而不是符号链接?

时间:2022-06-21 19:32:21

on a directory cp -rvf dir . copies the symbolic links and not actual contents. src is copied to module/hal/

在目录cp -rvf目录上。复制符号链接,而不是实际内容。src复制到模块/hal/。

.
|-- comm
|   `-- alchemist.c
|-- module
|   `-- hal
|       `-- src
|           `-- comm -> ../comm
`-- src
    `-- comm -> ../comm

1 个解决方案

#1


57  

From cp(1):

从cp(1):

   -L, --dereference
          always follow symbolic links in SOURCE

#1


57  

From cp(1):

从cp(1):

   -L, --dereference
          always follow symbolic links in SOURCE