When i use
find . -type f -path ./source/script -prune -o -print;
I get files in the cropped directory. / source / script.
... ./source/script ./source/script/myapp02.4372d2ea3388.js ./source/script/myapp02.js ./source/script/myapp02.1798d7bc34d2.js ...
But when I use:
find . -path ./source/script -prune -o -type f -print;
files in the "trimmed" directory are omitted:
./generate.py ./readme.txt ./source/class/myapp02/Application.js ./source/class/myapp02/Application.js:75: ./source/class/myapp02/__init__.js ./source/class/myapp02/Application.js~ ./source/class/myapp02/theme/Font.js ./source/class/myapp02/theme/Theme.js ./source/class/myapp02/theme/Decoration.js ./source/class/myapp02/theme/Color.js ./source/class/myapp02/theme/Appearance.js ./source/class/myapp02/simulation/DemoSimulation.js ./source/class/myapp02/test/DemoTest.js ./source/translation/readme.txt ./source/index.html ./source/index.html~ ./source/resource/myapp02/test.png ./Manifest.json ./config.json
In another example, I see:
find . -type d \( -path dir1 -o -path dir2 -o -path dir3 \) -prune -o -print
The only difference I see with mine is that -type d
is in my -type f
code.
Is this the only reason that -prune
is ignored and the search program searches inside the "cropped" directory?
source share