728x90
#include <unistd.h>
write(int fd , const void *buf , size_t count);
-파일 지정번호가 fd인 파일에 buf에 있는 데이터를 count 크기만큼 기록한다.
void main()
{
int fd;
char *buf = "testing...";
fd = open("./test.txt" , O_WRONLY );
write(fd , buf , strlen(buf));
}
반응형
'배워보자!! > 리눅스' 카테고리의 다른 글
[linux] 리눅스 fputs() 함수 (0) | 2015.05.20 |
---|---|
[linux] 리눅스 fopen(), fclose() 함수 (0) | 2015.05.20 |
[linux] 리눅스 read() 함수 (0) | 2015.05.20 |
[linux] 리눅스 open() 함수 (0) | 2015.05.20 |
[linux] 리눅스 wait() 함수 (0) | 2015.05.17 |
댓글