delete all files except in linux

find .!-iname dir1 !-iname dir2 -exec rm -rf {} \;