RE: mv'ing directories across fs'?

Daniel G. Linder (
Fri, 11 Jul 1997 12:25:04 -0400 (EDT)

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?
> This works just fine under IRIX (tested 6.2 and 6.4) and Solaris (tested
> 2.5.1)...

Technically, "mv" will just move inode pointers from one directory to
another directory and no copy is actually done. This is very quick and
safe. What is probably happening under IRIS and Solaris is that they
detect that the source and destinations are not on the same filesystem and
they use "cp --recursive" and then a "rm -rf" on the files. Since
filesystems have their own inode numbering scheme, an inode on one
filesystem with value "X" will not point to the same data as "X" on
another filesystem.

Someone could recompile mv with the "smarts" to do the cp/rm when


Daniel Linder W:(402) 393-3997 C:(402) 490-1673 P:(402) 579-1615
National / TechTeam WebCentric /
Ask me about Crutchfield's *great* return policy!