.\" Modified Sat Jul 24 00:35:52 1993 by Rik Faith <faith@cs.unc.edu>
.\" Modified Thu Jun 4 12:21:13 1998 by Andries Brouwer <aeb@cwi.nl>
.\" Modified Thu Mar 3 09:49:35 2005 by Michael Haardt <michael@moria.de>
+.\" 2007-03-25, mtk, added various text to DESCRIPTION.
.\"
.TH RENAME 2 1998-06-04 "Linux 2.0" "Linux Programmer's Manual"
.SH NAME
.SH DESCRIPTION
.BR rename ()
renames a file, moving it between directories if required.
-
Any other hard links to the file (as created using
.BR link (2))
are unaffected.
+Open file descriptors for
+.I oldpath
+are also unaffected.
If
.I newpath
.I newpath
will find it missing.
+If
+.I oldpath
+and
+.I newpath
+are existing hard links referring to the same file, then
+.BR rename ()
+does nothing, and returns a success status.
+
If
.I newpath
exists but the operation fails for some reason
.I newpath
in place.
+.I oldpath
+can specify a directory.
+In this case,
+.I newpath
+must either not exist, or it must specify an empty directory.
+
However, when overwriting there will probably be a window in which
both
.I oldpath