RENAME(1) RENAME(1) NAME rename - rename a file SYNOPSIS rename [-v] oldfile newfile DESCRIPTION Rename is for moving/overwriting a file in a safe manner. From the man page for rename(2): int rename (const char *oldpath, const char *newpath); If newpath already exists it will be atomically replaced ... so that there is no point at which another process attempting to access newpath will find it missing. For a database file, db, to be updated with a new database file, db.new: rename db.new db will move db.new to db in a safe manner, such that at no time will the database file, db, be unaccessable; a process accessing db during the renaming/moving/overwriting process is guaranteed to access either database file, db, or db.new. OPTIONS oldfile Old database file name. newfile New database file name. -v Print the program's version information. SEE ALSO mv(1), cp(1) DIAGNOSTICS Error messages for incompatible arguments, inaccessible and missing files. AUTHORS ---------------------------------------------------------------------- A license is hereby granted to reproduce this software source code and to create executable versions from this source code for personal, non-commercial use. The copyright notice included with the software must be maintained in all copies produced. THIS PROGRAM IS PROVIDED "AS IS". THE AUTHOR PROVIDES NO WARRANTIES WHATSOEVER, EXPRESSED OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, TITLE, OR FITNESS FOR ANY PARTICULAR PURPOSE. THE AUTHOR DOES NOT WARRANT THAT USE OF THIS PROGRAM DOES NOT INFRINGE THE INTELLECTUAL PROPERTY RIGHTS OF ANY THIRD PARTY IN ANY COUNTRY. Copyright (c) 2001-2007, John Conover, All Rights Reserved. Comments and/or bug reports should be addressed to: john@email.johncon.com (John Conover) ---------------------------------------------------------------------- January 1, 2007 RENAME(1)