How does 'mv' rename directories?

Guy Harris guy at auspex.auspex.com
Tue Sep 19 04:39:33 AEST 1989


>Also, [the rename system call is] useful on NFS systems, where the server
>you're mounting your filesystem from may not be a Unix system and may
>require some other (server-specific) technique to move files/directories; with
>rename(2), moves on remote-mounted filesystems are simply translated
>to appropriate calls to the NFS server.  Mkdir and rmdir are also
>system calls on BSD or NFS systems, for much the same reasons.

And also because:

	1) the remote server may not give clients the ability to get
	   root privileges (true both of NFS and RFS), so that even
	   set-UID "root" programs on the client may not have the root
	   privileges necessary to create, remove, or rename directories
	   in the "traditional" fashion;

and

	2) the file system in question may, even if it's not a remote
	   file system, not look enough like a "traditional" UNIX file
	   system (either V7/S5 *or* BSD) for the "traditional" ways of
	   creating, removing, or renaming directories to work, since
	   systems with VFS or the File System Switch can have all sorts
	   of different file system types plugged into them.

S5R3, having both RFS and the File System Switch, also has "mkdir" and
"rmdir" system calls; unfortunately, they forgot "rename", but that'll
be fixed in S5R4. 



More information about the Comp.unix.wizards mailing list