summaryrefslogtreecommitdiff
path: root/find.c
diff options
context:
space:
mode:
authorEric Andersen1999-10-05 16:24:54 +0000
committerEric Andersen1999-10-05 16:24:54 +0000
commitcc8ed39b240180b58810784f844e253263594ac3 (patch)
tree15feebbb4be9a9168209609f48f0b100f9364420 /find.c
downloadbusybox-cc8ed39b240180b58810784f844e253263594ac3.zip
busybox-cc8ed39b240180b58810784f844e253263594ac3.tar.gz
Initial revision0_29alpha2
Diffstat (limited to 'find.c')
-rw-r--r--find.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/find.c b/find.c
new file mode 100644
index 0000000..b3ac1ff
--- /dev/null
+++ b/find.c
@@ -0,0 +1,23 @@
+#include "internal.h"
+#include <errno.h>
+#include <stdio.h>
+
+const char find_usage[] = "find dir [pattern]\n"
+"\n"
+"\tFind files.\n";
+
+extern int
+find_main(struct FileInfo * i, int argc, char * * argv)
+{
+ i->recursive=1;
+ i->processDirectoriesAfterTheirContents=1;
+ return monadic_main(i, argc, argv);
+}
+
+extern int
+find_fn(const struct FileInfo * i)
+{
+ printf("%s\n",i->source);
+
+ return(0);
+}