현재 directory에 CLI_aaa, CLI_bbb, CLI_ccc file3개가 있고
만들어진 날짜가 다를때 가장 오래된 file 2개를 찾아서 그파일을
삭제하는 코드를 짜려고 합니다. 더 어떻게 해야하는지
고수님좀 도와주세요... ㅡ.ㅡ
#include <unistd.h>
#include <stdio.h>
#include <dirent.h>
#include <string.h>
#include <sys/stat.h>
#include <stdlib.h>
int count_CLI_log(char *logdir_name,char *loguser_name)
{
DIR *dp;
struct dirent *entry;
struct stat statbuf;
int CLI_logcnt = 0;
int i;
if((dp=opendir(logdir_name)) == NULL)