1

I remember that there is an utility for GNU/Linux, that given some directory, builds the same directory hierarchy, but with all regular files replaced by symlinks to the corresponding ones.

I can't remember its name.

Yes, I know it's a simple lesson in shell programming, but no reason to reinvent the wheel.

slhck
  • 235,242
KAction
  • 369

2 Answers2

2

cp has a -s flag, which makes symlinks, instead of copying. You can probably combine it with -r, so it recursively links everything, eg.:

cp -rs ./folder ./target/
0

How about some command-line fu? There are a number of ideas on that page.

uSlackr
  • 9,053