Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In case of unix/linux, is there a way to create union of two directories without copying or linking manually everything to a single directory?

share|improve this question
up vote 15 down vote accepted

One option is to use unionfs

Unionfs: A Stackable Unification File System

This project builds a stackable unification file system, which can appear to merge the contents of several directories (branches), while keeping their physical content separate. Unionfs is useful for unified source tree management, merged contents of split CD-ROM, merged separate software package directories, data grids, and more. Unionfs allows any mix of read-only and read-write branches, as well as insertion and deletion of branches anywhere in the fan-out.

Or another similar option aufs.

share|improve this answer
Your answer seems much better ! – Antoine Benkemoun Jun 5 '09 at 9:28
Having used unionfs to create a read-only filesystem with a read-write RAM FS on top of it, I can say that it's very easy to set up and works with little overhead. – andrewd18 Jun 5 '09 at 13:01

mhddfs is great for making a heap of drives that are transparently linked. It takes some /etc/fstab fiddling, but the solution works great for me

share|improve this answer

Your Answer


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.