Find command with exclusions

Hi All

I need to find the biggest files on our system BUT excluding some directories.

I.E Find / -size +10000 (excluding 'platform'|'db' ..etc) |sort -n > file

I tried grep -v but that can only do one expression at a time. Tried /usr/xpg4/bin/grep but cant use -v

Please help
Chris

find / -size +10000c | egrep -v "platform|db" |sort -n

GREAT !!! Thanks its working 100%

Just a quick question whats the 'c' for ? +10000c

The "c" stands for bytes (I guess originally "characters" but with Unicode and what not, that is not any longer one-to-one with bytes ... the "b" suffix is already used for "blocks" though) but isn't strictly necessary. As you might imagine, the manual page has more information.

Another approach is to use find's own options to exclude certain directories. The syntax is somewhat tricky but if you have GNU find, there is a rich set of conditions you can use to identify particular directories for inclusion or exclusion. A common trick is to select the directories you want to exclude and use -prune on them. So for example

find / -path /platform -prune -o -path /db -prune -o -size +10000 -ls

Thanks era !