How can I create an union merging / and another directory, on / itself?
2
votes
1
answer
1698
views
Say, we initially have
/
with the following contents:
/bin/foo
/usr/bin/bar
/usr/lib/libfoo.so
We also have another directory, say /stuff
, with the contents:
usr/lib/mystuff/mystuff.so
etc/foo/qux/buzz
bin/stuff
Is there a way to create a union between /
and /stuff
, so that I get:
/bin/foo
/bin/stuff
/usr/bin/bar
/usr/lib/libfoo.so
/usr/lib/mystuff/mystuff.so
/etc/foo/qux/buzz
(with all of the content from /stuff
there as well, just not shown there.)
This union should be of a **temporary nature** (just like filesystem mounts are), otherwise I could have used cp
, mv
or rsync
as well.
How should I go about doing this?
_One would expect that an answer to this would be easy to find; and indeed, there are many online resources that mention creating unions between two directories and mount them elsewhere, but none really cover this particular case of mounting a directory "over" /
._
Asked by user48923
Jul 8, 2016, 02:54 PM
Last activity: Jun 30, 2017, 01:45 PM
Last activity: Jun 30, 2017, 01:45 PM