This answer on opening all files in vim except [condition]:
gives an answer similar to this:
find . \( -name '.?*' -prune \) -o -type f -print
(I adapted the answer because my question here is not about vim)
Where the negated condition is in the escaped parentheses. However, on my test files, the following
find . -type f -not -name '^.*'
produces the same results, but is easier to read and write. The -not method, like the -prune method, prunes any directories starting with a . (dot). I am wondering what are the edge cases where the -not and the -prune -o -print method would have different results.
Findutils' infopage says the following:
-not expr: True if expr is false
-prune: If the file is a directory, do not descend into it. (and further explains that -o -print is required to actually exclude the top matching directory)
They seem to be hard to compare this way, because -not is a test and -prune is an action, but to me, they are interchangeable (as long as -o -print comes after -prune)