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?

2
  • 1
    Hello inthevidual, could you explain a little more (in your question) what problem you're trying to solve here. There might be solutions using a different approach. Commented Apr 26, 2020 at 12:11
  • Please also specify what extent of persistence you desire. For instance, persistent across shifts of file systems, etc? Commented Apr 26, 2020 at 12:53

1 Answer 1

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.