for(i
= 1 ; i
< argc
; ++i
)
if( strcmp(argv
[i
], "-c") )
if( stat(name
,&stbuff
) < 0)
fprintf(stderr
, "touch: file %s does not exist.\n", name
);
if( (fd
= open(name
, 2)) < 0)
if( read(fd
, junk
, 1) < 1)
if( write(fd
, junk
, 1) < 1 )
fprintf(stderr
, "Cannot touch %s\n", name
);
if( (fd
= creat(name
, 0666)) < 0)