If you have had googled you might not need this question. Any way
Quote:
The rename() function shall change the name of a file. The old argument points to the pathname of the file to be renamed. The new argument points to the new pathname of the file.
#include <stdio.h>
int status;
...
status = rename("/home/cnd/mod1", "/home/cnd/mod2");
Read this for aditional details.
rename(3): rename file - Linux man page[
^]