Rename (computing)

[1] In POSIX, which is extended from the C standard, the rename function will fail if the old and new names are on different mounted file systems.

[2] In SQL, renames are performed by using the CHANGE specification in ALTER TABLE statements.

In POSIX, a successful call to rename is guaranteed to have been atomic from the point of view of the current host (i.e., another program would only see the file with the old name or the file with the new name, not both or neither of them).

The rename function from the C library in Windows does not implement the POSIX atomic behaviour; instead it fails if the destination file already exists.

However, other calls in the Windows API do implement the atomic behaviour[citation needed].

Renaming a file in Ubuntu 18.04