1 |
On Wednesday 11 August 2010 00:09:13 Bill Longman wrote: |
2 |
> On 08/10/2010 02:06 PM, Jarry wrote: |
3 |
> > Hi, |
4 |
> > I am facing this problem: I have subdirectory, let's say |
5 |
> > "/some/dir". I would like to create some kind of "dynamic" |
6 |
> > and "preliminary" link, so that any future subdirectories, |
7 |
> > created later in /some will in fact be links, pointing to |
8 |
> > /some/dir. |
9 |
> > |
10 |
> > So if later any user does: |
11 |
> > cd /some |
12 |
> > mkdir whatever |
13 |
> > |
14 |
> > There should not be subdirectory /some/whatever, but actually link: |
15 |
> > /some/whatever -> /some/dir |
16 |
> > |
17 |
> > Is it possible? |
18 |
> |
19 |
> Unless you write your own kernel module, the answer is "No." |
20 |
|
21 |
The slightly longer answer is that the idea, as presented, is stupid. Looks |
22 |
like a foolish grasp at a "solution" for a "problem". |
23 |
|
24 |
If the OP wants a link in /some/ he needs to make one using ln |
25 |
If the OP wants a subdir in /some/ he needs to make one using mkdir |
26 |
|
27 |
There is no magic way to turn one into the other because they are different. |
28 |
It appears to me that he finds things like /some/otherdir/ that should never |
29 |
have been created at all and their contents should have gone into /some/dir/ |
30 |
instead. There's an easy solution to that: |
31 |
|
32 |
remove write permission from /some/ and add it to /some/dir/ for all users |
33 |
that write to /some/dir/. They can't create the wrong directories without |
34 |
permissions. |
35 |
|
36 |
|
37 |
-- |
38 |
alan dot mckinnon at gmail dot com |