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