Depending on the search engine, it may not even look at your robots.txt.
Validator
User-agent: *
Disallow: /forum/
The following allows all robots to visit all files because the wildcard "*" specifies all robots.
User-agent: *
Disallow:
This one keeps all robots out.
User-agent: *
Disallow: /
The next one bars all robots from the cgi-bin and images directories:
User-agent: *
Disallow: /cgi-bin/
Disallow: /images/
This one bans BadSearch from all files on the server:
User-agent: BadSearch
Disallow: /
This one bans keeps googlebot from getting at the whatever.htm file:
User-agent: googlebot
Disallow: whatever.htm