How does 'mv' rename directories?

Guy Harris guy at auspex.auspex.com
Fri Sep 15 03:20:29 AEST 1989


>But on Microport, Xenix, and Sun Unix 4.0, /bin/mv is -rwxr-xr-x and is
>owned by 'bin'.   How is 'mv' able to rename directories on a properly 
>working system?

In SunOS 4.0 - and in other systems that have the "rename()" system call
from 4.[23]BSD, including all other SunOS releases, 4.[23]BSD
themselves, Ultrix, etc. - it uses the "rename" call, which lets you
move directories when it's safe, and doesn't require super-user
privileges.

I expect S5R4 to have this as well, and thus to render obsolete the
program that S5R3, at least (and possibly Microport and Xenix, and maybe
some older S5 releases, as well) uses to move directories. 



More information about the Comp.unix.wizards mailing list