0

Is it possible to use symbolic links or some other method, i.e. a 'virtual directory' or mount, by which the following is achieved, and persistent?

Directory tree A, original

root dir 
|
 +-- dir 1
 |  |  
 |  +-- dir 1.1

Directory tree B, symlinked/virtualised to remove one layer in the tree

root dir 
|
 +-- dir 1.1

I know it can be done as a one time operation by generating symbolic links, but I'm wondering if there's a way to make it persistent, so that if I add a folder 1.2 in directory tree A, it will always show up in the root of directory tree B?

1 Answers1

0

You can use rsync with some script that is ran when new item is created in the first directory. something like rsync --avu delete /dirA /dirB This is helpful: How to sync folders For the script you can use inotify to monitor the create/delete actions in the directory

Angel
  • 330