find . \( -type f \) -o \( -name "*.rpm" -prune \)
find . \( -name "*.sh" \) -o \( -name "*.rpm" -prune \)
The second command excludes .rpm but the first one doesn't.
What's the problem with first one?
Os:: Rhel 6(Redhat Enterprise Linux 6)
.rpm
.find
on directories, so you don't recurse in the branches (= subdirectories) underneath. WIth find anding is implicit,-o
has to be given explicitly.