DIR is a DOS command for listing files. Under FreeBSD and other unix-like OSes, the equivalent command is ls.
Note that in the second example, ls | grep boogy is actually directly equivalent to dir *boogy*.*, not just dir boogy*.*. If you really want to only find instances in which "boogy" is the very beginning of the filename, you'll need to delve into using grep with regular expressions.