.\" Copyright (c) 1983, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" This module is believed to contain source code proprietary to AT&T. .\" Use and redistribution is subject to the Berkeley Software License .\" Agreement and your Software Agreement with AT&T (Western Electric). .\" .\" @(#)rename.3 8.1 (Berkeley) 6/5/93 .\" .TH RENAME 3F "June 5, 1993" .UC 5 .SH NAME rename \- rename a file .SH SYNOPSIS .B integer function rename (from, to) .br .B character*(*) from, to .SH DESCRIPTION .I From must be the pathname of an existing file. .I To will become the new pathname for the file. If .I to exists, then both .I from and .I to must be the same type of file, and must reside on the same filesystem. If .I to exists, it will be removed first. .PP The returned value will be 0 if successful; a system error code otherwise. .SH FILES .ie \nM /usr/ucb/lib/libU77.a .el /usr/lib/libU77.a .SH "SEE ALSO" rename(2), perror(3F) .SH BUGS Pathnames can be no longer than MAXPATHLEN as defined in .RI < sys/param.h >.