[code:1]
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
char * path = "/opt/SongSoft/Log/ssf.cnx";
void main(void)
{
struct stat buf;
long size;
int flag;
while(1)
{
sleep(3); <=== 주목
size = buf.st_size;
flag = lstat(path, &buf);
if(flag == -1 || errno == 2)
printf("file does not exit\n");
else
printf("org:%d, new:%d\n", size, buf.st_size);