Re: mv'ing directories across fs'?

Mikko J Rauhala (mjrauhal@cc.helsinki.fi)
Fri, 11 Jul 1997 10:26:30 +0300 (EET DST)


On Thu, 10 Jul 1997, Taner Halicioglu wrote:

> Forgive me if this was covered before, but why is mv'ing a directory
> across filesystems not allowed under Linux? Is this an ext2 'feature', or
> something else?

It is not possible to do with a simple rename() operation, which mv uses.

> This works just fine under IRIX (tested 6.2 and 6.4) and Solaris (tested
> 2.5.1)...

I suppose their mv's do a copy-and-delete to simulate the operation.
The GNU mv used by most Linux systems does not seem to do that for
directories (I'm counting on your word on this), although it does it for
files. IMHO, it should be considered a bug.

Anyway, this is not a kernel issue.

-- 
Mikko Rauhala, sivari - mjr@iki.fi - http://www.iki.fi/mjr/