remove

    C / LINUX remove(3) rename(2)

    함수 기능 remove 파일이나 디렉토리를 unlink하는 시스템 호출, root권한 없는 unlink rename 파일 이름을 변경 할 때 호출하는 시스템 호출 함수 원형 #include int remove(const char *filepath); int rename(const char *oldname const char *newname); 리턴 값 : 성공시 0 에러 시 -1 함수 파라메터 filepath 파일의 경로 oldname 바뀌기전 구 이름 newname 바꿀 새로운 이름 함수 예제 remove #include #include #include int main(int argc, char *argv[]){ if(argc !=3){ fprintf(stderr,"usage : %s\n",argv[0..