Cristian Zoicas <zoi...@medialab.sissa.it> writes: > The following directory structure and the following statement show that -prune > does not return false when -depth is given. > > mkdir -p test/s_files/ > echo a-top > test/a-top.txt > echo s-top > test/s-top.txt > echo a > test/s_files/a.txt > echo s1 > test/s_files/s1.txt > echo s2 > test/s_files/s2.txt
Or to make it much clearer: test/ a-top.txt s-top.txt s_files/ a.txt s1.txt s2.txt > find ./test/ -depth \( -name s\* -a -prune -a -printf "printed with printf: > %p\n" \) -o -exec bash -c 'echo printed with echo: {}' '; It seems to me that a much simpler test case that exercises the same logic is: find ./test/ -depth -prune -print What version of find are you running? (I am running 4.5.11, which is quite old. But indeed, the above command runs for me as if -prune returns true.) Dale