If one does a 'cp -rl' -- one gets a coyp of the tree...sorta,
with file hardlinked, and with directories getting their own set
of inodes because:
can't be hardlinked -- so no hardlinking (even if worked, wouldn't make
a separate copy) &&
can't have softlinked dirs, as to softlink something, you need something
to softlink things *to*.  If dirs were softlinked, again, the files
inside would be referenced by the same name-entry in the same real directory.

Instead it tries to do a useful think in creating a separate tree with
a fresh set of name entries that point to the same inode-data.

In the same way, I'm often wanting to work on some set of source
files from a different starting location in the source tree.

Like I'll want an "RCS" dir to point to 1 RCS tree -- so I try to use
ln <existing RCSdir> <new RCS loc>.  ln, of course seems to think I
want the impossible -- and says you can't have hard-linked directories.

Instead, just as cp-rl only hard links files while creating new dirs
for directories in the other tree, instead of treating dirs+files the
same, and giving an error message that wouldn't be helpful.

I was wondering if ln dir1 target/ could differentiate and "do what
I meant", and create a softlink rather than giving an error and
requiring me to re enter the command with -l.

I wouldn't be against the idea of it saying that it created a softlink,
but the point it to favor it doing something useful rather than issuing an
error that isn't.

Would that be possible? Thanks, Linda

Reply via email to