I have the following directories:
/some/path/dir1/subdir1/*
/some/path/dir1/subdir2/*
/some/path/dir1/subdir3/*
/some/path/dir2/subdir1/*
/some/path/dir2/subdir2/*
/some/path/dir2/subdir3/*
I want to create an overlayfs (or similar) mount that merges subdir2
from both dir1
and dir2
.
mount overlay -t overlay -o lowerdir=/some/path/dir1/subdir2:/some/path/dir2/subdir2 /newpath
However, I want to keep their full paths, so that /newpath
will contain the following:
/newpath/some/path/dir1/subdir2/*
/newpath/some/path/dir2/subdir2/*
I have not been able to find any information on this online... can this be done? Or is there another tool that could accomplish this for me?