* Copyright (c) 1990 The Regents of the University of California.
* %sccs.include.redist.c%
static char sccsid
[] = "@(#)main.c 5.9 (Berkeley) %G%";
time_t now
; /* time find was run */
int dotfd
; /* starting directory */
int ftsoptions
; /* options for the ftsopen(3) call */
int isdeprecated
; /* using deprecated syntax */
int isdepth
; /* do directories on post-order visit */
int isoutput
; /* user specified output operator */
int isxargs
; /* don't permit xargs delimiting chars */
register char **p
, **start
;
(void)time(&now
); /* initialize the time-of-day */
ftsoptions
= FTS_NOSTAT
|FTS_PHYSICAL
;
while ((ch
= getopt(argc
, argv
, "df:sXx")) != EOF
)
ftsoptions
&= ~FTS_PHYSICAL
;
ftsoptions
|= FTS_LOGICAL
;
ftsoptions
&= ~FTS_NOSTAT
;
/* Find first option to delimit the file list. */
if ((dotfd
= open(".", O_RDONLY
, 0)) < 0)
err(".: %s", strerror(errno
));
find_execute(find_formplan(argv
), start
);
"usage: find [-dsXx] [-f file] [file ...] expression\n");