I want to find files that end with _peaks.bed, but exclude files in the tmp and scripts folders.
_peaks.bed
tmp
scripts
My command is like this:
Here is one way you could do it...
find . -type f -name "*_peaks.bed" | egrep -v "^(./tmp/|./scripts/)"