Skip to content

write동작의이해

Taeung Song edited this page Dec 10, 2018 · 1 revision

open + write 과정

작업 환경

테스트 소스

#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

void main()
{
	FILE *fp = fopen("/home/kosslab/hello.txt", "w");

	if (fp) {
		fprintf(fp, "hello linux filesystem\n");
		fclose(fp);
		sync();
	}
}