[리눅스] 간단한 tail -f 구현
·
IT기술 관련/리눅스
http://www.opensource.apple.com/source/text_cmds/text_cmds-9/tail/tail.c 출처: http://jangpd007.tistory.com/17 kernel 2.6.1 이상이어야 함 이하는 dnotify 사용해야 함 #include #include #include #include #include #include #include #include #include int exitflag = 1; int main (int argc, char *argv[]) { if (argc == 1) { printf ("tail filename\n"); return 0; } char fname [256]; sprintf (fname, "%s", argv[1]); FILE *f..