lkml.org 
[lkml]   [2003]   [Sep]   [29]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: multiple link
From Valdis.Kletnieks@vt ...
DateMon, 29 Sep 2003 01:57:16 -0400
On Mon, 29 Sep 2003 00:43:22 CDT, Indraneel Majumdar <indraneel@smartpatch.net>  said:
> Hi,> I was wondering if it's possible to link to multiple directories at the
> same time:> > link <link_name> <target1> <target2> <target3>...

Not really a kernel question, but anyhow..

'man 2 link' and 'man 2 symlink' will tell you that the system calls only make
one link at a time.  What /bin/ln does is a userspace question, but Kerhnigan
and Pike would likely say the Right Answer is:

% for i in target1 target2 target3; do ln link-name $i; done

If you're asking something else, such as "How do I hardlink a directory to more
than one parent?", that *is* a kernel question, but the generic answer is "You
don't, unless you have a novel way to identify the Right Answer for 'where does
../ point?'".  Check the archives, it was beaten to death a few weeks ago....
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:48    [from the cache]
©2003-2008