title: Find out if USB device is connected. Ruby in Linux
body: <p>I'm using Ruby 1.8 and linux (Ubuntu and SLAX), and i need to write a script in ruby which  finds out if some specific usb device is connected to the system and on which USB port (0,1,2, etc). It was done before with the help of HAL (hal-find-by-capability --capability serial), but now i can't use this approach. I was trying to read /var/log/messages file trying to find the number of the usb port, but it appears that this number may not be written in some systems. Other thing i tried is to check /dev folder and search for ttyUSB# file, but it doesn't appear on some system when new device connects to USB.
  I would appreciate any ideas how to do this.</p>