void tail_c() { numberOfByte=atoi(params[2]); numberOfByteShow=sizeof(file_name)-numberOfByte; file_name=params[3]; if((status=open(file_name,O_RDONLY))==-1) { perror("Error"); } else { buf=(char*)malloc(sizeof(char)*(SIZE+1)); lseek(status,0L,SEEK_CUR); if((n=read(status,buf,SIZE))!=SIZE) printf("%s", buf); } close(status); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)