			printf("bad input line: %d\n",line);
			while(getc(stdin) != '\n');
			continue;
		}
		command[n] = '\0';
		if(stat(command,&sbuf) < 0) {
			printf("%s: cannot access file status\n",command);
			continue;
		}

		if((sbuf.i_mode & IFMT) == IFDIR) {
			if((dfd = open(command,0)) < 0) {
				printf("\n%s: cannot read directory\n",command);
				chdir (base);
				continue;
			}
			if(chdir(command) < 0) {
				printf("%s: cannot chdir\n",command);
				chdir(base);
				continue;
			}
			printf("%s:\n",command);
			seek(dfd,32,0);
			while(read(dfd,&dirb,16) == 16)
				if(dirb.d_ino) {
					if(stat(dirb.d_name,&sbuf) < 0)
						printf("%s: cannot access file status\n",dirb.d_name);
					else check(dirb.d_name);
				}
			printf("\n");
			chdir (base);
			close(dfd);
		}
		else check(command);
	}
	if(!low) creat(newdate,0600);
}

long
atol(s)
	register char *s;
{

	register int n;
	long value;

	for(n=0,value=0; '0' <= *s && *s <= '9'; n++)
		value = value * 10 + *s++ - '0';
	if( n != 6) return (0);
	return(value);
}

check(string)
	register char *string;
{
	register struct time *t;
	long lcomp;

	if(low) {
		t = localtime(&sbuf.i_mtime);
		lcomp = t->t_year * 10000L 
			+ (t->t_month + 1) * 100L
			+ t->t_day_month;
		if(lcomp > comp) 
			printf("%s: modified %s", string, ctime(&sbuf.i_mtime));
		return;
	}
	if(sbuf.i_mtime > comp)
		printf("%s: modified %s", string, ctime(&sbuf.i_mtime));
}
e;

	for(n=0,value=0; '0' <= *s && *s <= '9'; n++)
		value = value * 10 + *s++ - '0';
	if( n != 6) return (0);
	return(value);
}/*
 * who
 */

int	fout;
int	buf[256];

main(argc, argv)
char **argv;
{
	char *s, *cbuf;
	int n, fi, i;
	int tty;
	struct {
		char name[8];
		char tty;
		char pad1;
		int time[2];
		char pad2[2];
	} *p;

	s = "/etc/utmp";
	if(argc == 2)
		s = argv[1];
	fi = open(s, 0);
	if(fi < 0) {
		write("cannot open wtmp\n", 17);
		exit(0);
	}
	fout = dup(1);
	close(1);
	if (argc==3)
		tty = ttyn(0);

loop:
	n = read(fi, buf, 512);
	if(n == 0) {
		flush();
		if (argc==3)
			write(fout, "Nobody.\n", 8);
		exit(0);
	}

	p = &buf;
	for(p = &buf; (n =- 16)>=0; p++) {
		if (argc==3 && tty!=p->tty)
			continue;
		if(p->name[0] == '\0' && argc==1)
			continue;
		for(i=0; i<8; i++) {
			if(p->name[i] == '\0')
				p->name[i] = ' ';
			putchar(p->name[i]);
		}
		for(i=0; i<3; i++)
			putchar("tty"[i]);
		putchar(p->tty);
		c