4 int touch(int, char *);
10 fprint(2, "usage: touch [-c] [-t time] files\n");
15 main(int argc, char **argv)
25 now = strtoul(t, &s, 0);
26 if(s == t || *s != '\0')
39 status += touch(nocreate, *argv++);
45 touch(int nocreate, char *name)
52 if(dirwstat(name, &stbuff) >= 0)
55 fprint(2, "touch: %s: cannot wstat: %r\n", name);
58 if((fd = create(name, OREAD|OEXCL, 0666)) < 0){
59 fprint(2, "touch: %s: cannot create: %r\n", name);
62 dirfwstat(fd, &stbuff);