Beagleboard xm - ubuntu - spi demo

All:
I am a newbie to Linux(Ubuntu) and to the BBxM but have managed to get Ubuntu on the SD card and change the uEnv file to enable SPI.
The SPI files show up in the /dev directory . I saw some C code somewhere that showed how to utilize the SPI ports and read
data in from them. I cannot seem to find the link again and was wondering if anyone had a simple C program that utilized the SPI ports.

Thanks in advance