GNU find: when does the default action apply?
问题 The man page of Debian 8's find command says: If the whole expression contains no actions other than -prune or -print, -print is performed on all files for which the whole expression is true. So why do these outputs differ: $ mkdir -p test/foo test/bar && cd test && touch foo/bar bar/foo $ # Test 1 $ find . -name foo -type d -prune -o -name foo ./foo ./bar/foo $ # Test 2 $ find . -name foo -type d -prune -o -name foo -print ./bar/foo So test 1: does the expression contain "no actions other