/* * Sample program for rename system call - No.38 * * rename(2) - change the name or location of a file * * Synopsis * #include * * int rename(const char *oldpath, const char *newpath); * * Description * rename renames a file, moving it between derectories if required */ #include main(int argc, char *argv[]) { if (argc != 3) exit(1); rename(argv[1], argv[2]); exit(0); }