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:
You can try below:
find ./ ! \( -path ./tmp -prune \) ! \( -path ./scripts -prune \) -type f -name '*_peaks.bed'