StudyingUnixInterface/4/fileDirectory/rename.c

11 lines
188 B
C
Raw Normal View History

2020-12-07 04:17:01 +00:00
#include <fcntl.h>
#include <stdio.h>
int main(void) {
if(renameat(AT_FDCWD, "test/test2", AT_FDCWD, "test/test3") < 0) {
printf("rename error\n");
return -1;
}
return 0;
}