[ILUG] bug in mv and/or ln
Breathnach, Proinnsais (Dublin)
breatpro at exchange.ie.ml.com
Fri Jun 11 15:15:18 IST 1999
I think what was intended was
mkdir foo
ln -s foo bar
mv bar bar
and see what happens, bar will seem to disappear when it was really moved to
foo/
mv follows / resolves the link before executing - proper order :o)
Proinnsias
------------------------------------------
Business Systems Development
Merrill Lynch Capital Markets Bank, Treasury Building, Lower Grand Canal
St., Dublin 2
Tel: + 353 (0)1 6058532
> -----Original Message-----
> From: Mike Knell [SMTP:mike.knell at cs.tcd.ie]
> Sent: Friday, June 11, 1999 3:00 PM
> To: ilug at linux.ie
> Subject: Re: [ILUG] bug in mv and/or ln
>
>
>
> > Try this in Linux:
> >
> > create a soft link to a directory,
> > ln -s directory link
> >
> > now, do the following:
> > mv directory directory
> >
> > Watch what happens. The "directory" link disappears. A bug?
>
> What exactly do you mean here?
>
> If you rename a directory, any symbolic links (as opposed to hard links)
> to it will, I believe, be broken, but the links will remain there
> pointing to the old name.
>
> I've tried replicating the above, but haven't noticed any vanishing
> links - just symlinks with nothing left to point at, poor things.
>
> For clarity, I tried
>
> mkdir foo
> ln -s foo bar
> mv foo baz
>
> and ended up with
>
> lrwxrwxrwx 1 mknell mknell 3 Jun 11 14:59 bar -> foo
> drwxr-xr-x 2 mknell mknell 1024 Jun 11 14:59 baz
>
> which is correct behaviour.
>
> Mike
>
> --
> Computer Science System Administrator, Trinity College, Dublin, Ireland
> mike.knell at cs.tcd.ie -=- http://www.cs.tcd.ie/Mike.Knell/
>
> --
> Irish Linux Users' Group: ilug at linux.ie
> http://www.linux.ie/mailman/listinfo/ilug for (un)subscription
> information.
> List maintainer: listmaster at linux.ie
More information about the ILUG
mailing list