1find: "testdir": No such file or directory
2find: "testdir/../testdir": No such file or directory
3find: "testdir": No such file or directory
4find: "testdir": No such file or directory
5find: "testdir": No such file or directory
6find: "testdir": No such file or directory
7find: "testdir": No such file or directory
8find: "testdir": No such file or directory
9find: "testdir": No such file or directory
10find: "testdir": No such file or directory
11find: "testdir": No such file or directory
12find: "testdir": No such file or directory
13find: "testdir": No such file or directory
14find: "testdir": No such file or directory
15find: "testdir": No such file or directory
16find: "testdir": No such file or directory
17find: "testdir": No such file or directory
18find: "testdir": No such file or directory
19find: "testdir": No such file or directory
20cd: testdir: No such file or directory
21cd: testdir///: No such file or directory
22cd: testdir///dir1//: No such file or directory
23cd: testdir: No such file or directory
24find: "testdir": No such file or directory
25find: "testdir": No such file or directory
26find: "testdir": No such file or directory
27find: "testdir": No such file or directory
28find: "testdir": No such file or directory
29find: "testdir": No such file or directory
30cd: testdir: No such file or directory
31cd: testdir: No such file or directory
32cd: testdir: No such file or directory
33find: "testdir": No such file or directory
34find: "testdir": No such file or directory
35find: "testdir": No such file or directory
36find: Expected a positive decimal integer argument to -maxdepth, but got "hoge"
37find: Expected a positive decimal integer argument to -maxdepth, but got "1hoge"
38find: Expected a positive decimal integer argument to -maxdepth, but got "-1"
39build/tools/findleaves.py: No such file or directory
40build/tools/findleaves.py: No such file or directory
41build/tools/findleaves.py: No such file or directory
42build/tools/findleaves.py: No such file or directory
43build/tools/findleaves.py: No such file or directory
44build/tools/findleaves.py: No such file or directory
45build/tools/findleaves.py: No such file or directory
46build/tools/findleaves.py: No such file or directory
47build/tools/findleaves.py: No such file or directory
48build/tools/findleaves.py: No such file or directory
49cd: xxx: No such file or directory
50no options
51$ find testdir
52
53$ find .
54. ./Makefile ./submake
55$ find ./
56./ ./Makefile ./submake
57$ find .///
58./// .///Makefile .///submake
59$ find
60. ./Makefile ./submake
61$ find ./.
62./. ././Makefile ././submake
63$ find ././
64././ ././Makefile ././submake
65$ find testdir/../testdir
66
67print
68$ find testdir -print
69
70conditiions
71$ find testdir -name foo
72
73$ find testdir -name file1
74
75$ find testdir -name "file1"
76
77$ find testdir -name "file1"
78
79$ find testdir -name "*1"
80
81$ find testdir -name "*1" -name "file*"
82
83$ find testdir -name "*1" -and -name "file*"
84
85$ find testdir -name "*1" -or -name "file*"
86
87$ find testdir -name "*1" -or -type f
88
89$ find testdir -name "*1" -or -not -type f
90
91$ find testdir -name "*1" -or \! -type f
92
93$ find testdir -name "*1" -or -type d
94
95$ find testdir -name "*1" -or -type l
96
97$ find testdir -name "*1" -a -type l -o -name "dir*"
98
99$ find testdir -name "dir*" -o -name "*1" -a -type l
100
101$ find testdir \( -name "dir*" -o -name "*1" \) -a -type f
102
103cd
104$ cd testdir && find
105
106$ cd testdir/// && find .
107
108$ cd testdir///dir1// && find .///
109
110$ cd testdir && find ../testdir
111
112test
113$ test -d testdir && find testdir
114
115$ if [ -d testdir ] ; then find testdir ; fi
116
117$ if [ -d testdir ]; then find testdir; fi
118
119$ if [ -d testdir ]; then cd testdir && find .; fi
120
121$ test -d testdir//dir1/// && find testdir///dir1///
122
123$ test -d testdir//.///dir1/// && find testdir//.///dir1///
124
125prune
126$ find testdir -name dir2 -prune -o -name file1
127
128multi
129$ find testdir testdir
130
131symlink
132$ find -L testdir -type f
133
134$ find -L testdir -type d
135
136$ find -L testdir -type l
137
138$ cd testdir; find -L . -type f
139./Makefile ./submake/basic.mk
140$ cd testdir; find -L . -type d
141. ./submake
142$ cd testdir; find -L . -type l
143
144maxdepth
145$ find testdir -maxdepth 1
146
147$ find testdir -maxdepth 2
148
149$ find testdir -maxdepth 0
150
151$ find testdir -maxdepth hoge
152
153$ find testdir -maxdepth 1hoge
154
155$ find testdir -maxdepth -1
156
157findleaves
158$ build/tools/findleaves.py testdir file1
159
160$ build/tools/findleaves.py testdir file3
161
162$ build/tools/findleaves.py --prune=dir1 testdir file3
163
164$ build/tools/findleaves.py --prune=dir1 --prune=dir2 testdir file3
165
166$ build/tools/findleaves.py --mindepth=1 testdir file1
167
168$ build/tools/findleaves.py --mindepth=2 testdir file1
169
170$ build/tools/findleaves.py --mindepth=3 testdir file1
171
172$ build/tools/findleaves.py --mindepth=2 testdir file1
173
174$ build/tools/findleaves.py --prune=dir1 --dir=testdir file1
175
176$ build/tools/findleaves.py --prune=dir1 --dir=testdir file3 link3
177
178missing chdir / testdir
179$ cd xxx && find .
180
181$ if [ -d xxx ]; then find .; fi
182