Description: Option "-prune" of "find" command doesn't work (as it is described in the find manual) In the find manual one can read: ************************************************************************** -path pattern File name matches shell pattern pattern. The metacharacters do not treat '/' or '.' specially; so, for example, find . -path './sr*sc' will print an entry for a directory called './src/misc' (if one exists). To ignore a whole directory tree, use -prune rather than checking every file in the tree. For example, to skip the directory '/src/emacs/' and all files and directories under it, and print the names of the other files found, do something like this: find . -path './src/emacs' -prune -o -print ************************************************************************** I have made the appropriate directory tree ('/src/emacs/' and directories under it) and I have issued the command: find . -path './src/emacs' -prune -o -print This command has printed also the directory '/src/emacs/' and all files and directories under it - it shouldn't do so. Version-Release number of selected component (if applicable): findutils-4.1.7-9 Luke.
Works for me: $ for a in a b c; do mkdir $a; touch $a/file; done $ mkdir -p src/emacs; touch src/emacs/file $ find . -path './src/emacs' -prune -o -print . ./a ./a/file ./b ./b/file ./c ./c/file ./src