symlink-copying a directory hierarchy

前端 未结 7 1668
孤独总比滥情好
孤独总比滥情好 2020-12-13 19:38

What\'s the simplest way on Linux to \"copy\" a directory hierarchy so that a new hierarchy of directories are created while all \"files\" are just symlinks pointing back to

7条回答
  •  余生分开走
    2020-12-13 20:02

    I know the question was regarding shell, but since you can call perl from shell, I wrote a tool to do something very similar to this, and posted it on perlmonks a few years ago. In my case, I generally wanted directories to remain links until I decide otherwise. It'd be a fairly trivial change to do this automatically and recursively.

提交回复
热议问题