search department.company.com company.comwhich would cause the system to search first for "host.department.company.com" then, if that fails, "host.company.com". Under OS X, you'll find that there are two "resolv.conf" files:
# locate resolv.confbut neither of them can actually be used to do what I described above, although the contents of the files looks like a regular resolv.conf file under Linux.
Since OS X 10.4, these resolv.conf files are just for informational purposes, and even though you can modify the files, many applications will ignore them. Fortunately, there's a convenient command-line tool for changing the underlying DNS settings. The networksetup command can do it for you, like this:
-setsearchdomains 'Built-in Ethernet' department.company.com company.com
According to this post it also seems to be possible to use scutil to do this, although I haven't tried it and it looks more complicated.