Subject: Re: Linux emulation and mkdir with trailing /
To: Greywolf <>
From: Andrew Brown <>
List: tech-kern
Date: 09/29/2000 02:48:39
>#    % cd /tmp ; mkdir -p foo/bar ; mv foo frotz
># i was surprised when i saw that it worked twice.
>1.	rename foo to frotz.  Straight up, since frotz didn't exist.

sure.  easy.

>2.	rename foo to frotz/foo, since frotz/foo didn't exist before.

well, yes.  but you're still only explicitly saying "mv foo frotz".
you're *not* explicitly saying "mv foo frotz/foo".  the fact that it
works is the part that makes some people think everything's fine...

>3.	Fails because frotz/foo exists and is not empty.  It's not trying
>	to clobber frotz directly.

...when it's not.

>Seems very UNIX-like to me :-)

oh, yes.  quite.  but try explaining that to some people and they'll
just wander off, calling over their shoulder that you should just fix
the damn thing.

if something works once, that's great.  if it works more than once,
they expect it to work all the time.  two is not a factor.

|-----< "CODE WARRIOR" >-----|             * "ah!  i see you have the internet (Andrew Brown)                that goes *ping*!"       * "information is power -- share the wealth."