0

So, by doing ln -s /my/source/* ./

I created a link to content of source but changes in source aren't reflected in the target.

For example, when I create new folder in source it's not being shown in target

1 Answer 1

0

Actually this is the expected behavior. Your command will make links for current contents of /my/source/ directory.

The easy solution is to link the directory itself:

ln -s /my/source ./

it will create a link like:

source -> /my/source

But also inotifytools can be used to watch the directory and take an action.

1
  • Creating link to directory wouldn't work since I want to have content from multiple locations.It wasn't mentioned in the question but it would be the final goal. Commented Apr 18, 2020 at 17:37

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.