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.

Here's what I'd like to do: I have some directories that I need to have separate copies of, but these directories are 2+ GB so simply copying the directory several times seems inefficient. 90% of these directories are identical, and only a few files change.

I'd like to setup some sort of system that acts like a mount -bind or a symlink in the sense that the files/directories are accessible without multiple copies, but (here's the weird part) I'd like to have one main copy act as a sort of 'template' in the sense that it is mounted but it is not changed. When a file is changed, it is stored on the disk like normal, but the updated version is read instead of the template version.

Pretty much, a directory's contents are symlinked until a file is modified, at that point the link is broken and the new file written to the disk.

I'm not really sure where to look, or what to google to get ideas on how to do this.

share|improve this question
    
You might look at "Copy-on-write" filesystems, or the unionfs filesystem driver. –  Darth Android Oct 4 '12 at 18:57
    
I'll look into those, at first glance they look promising. Thanks! –  akester Oct 4 '12 at 19:38

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.