Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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/
share|improve this answer
    
Perfect. Thank you very much. –  KAction Apr 2 '12 at 4:23

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.