diff options
author | Pascal Stumpf <pascal@cvs.openbsd.org> | 2012-01-02 23:19:46 +0000 |
---|---|---|
committer | Pascal Stumpf <pascal@cvs.openbsd.org> | 2012-01-02 23:19:46 +0000 |
commit | 5b13b668414d89ca70d96a584fcd549f49127a25 (patch) | |
tree | e1c79067e64f6f080d3e20aa804e5043695a8bc9 /usr.bin/find/extern.h | |
parent | dae44749145c17a6a9f82a9eed5969a87b162936 (diff) |
Add support for "find ... -exec foo {} \+".
From the manpage:
If terminated by a plus sign (``+''), the pathnames for which the
primary is evaluated are aggregated into sets, and utility will
be invoked once per set, similar to xargs(1). If any invocation
exits with non-zero exit status, then find will eventually do so
as well, but this does not cause find to exit early. The string
``{}'' must appear, and must appear last. Each set is limited to
no more than 5,000 pathnames, and is also limited such that the
invocation of utility does not exceed ARG_MAX.
Code comes from NetBSD, written by John Hawkinson. Tested by eivinde at
terraplane dot org and myself for quite some time.
ok miod@
Diffstat (limited to 'usr.bin/find/extern.h')
-rw-r--r-- | usr.bin/find/extern.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/find/extern.h b/usr.bin/find/extern.h index 737436b5932..476ea0fecc4 100644 --- a/usr.bin/find/extern.h +++ b/usr.bin/find/extern.h @@ -1,4 +1,4 @@ -/* * $OpenBSD: extern.h,v 1.16 2011/04/21 01:14:21 jacekm Exp $*/ +/* * $OpenBSD: extern.h,v 1.17 2012/01/02 23:19:45 pascal Exp $*/ /*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -37,10 +37,12 @@ void *emalloc(unsigned int); PLAN *find_create(char ***); int find_execute(PLAN *, char **); PLAN *find_formplan(char **); +int find_traverse(PLAN *, int (*)(PLAN *, void *), void *); PLAN *not_squish(PLAN *); OPTION *option(char *); PLAN *or_squish(PLAN *); PLAN *paren_squish(PLAN *); +int plan_cleanup(PLAN *, void *); struct stat; void printlong(char *, char *, struct stat *); int queryuser(char **); |