I am new to C and trying to write a program that synchronizes files on my computer with a USB device. Currently, he works with my directory in the directory to which the device is connected, and typing "myprog init", which creates the .myprog file. Then the idea is that when I connect a USB device, my program checks the .myprog file, if it finds it, it syncs. The problem is that I cannot figure out how to determine when a new USB device is connected.
I am writing a program for Linux (I am using Ubuntu 9.04) and using GCC.
Thanks for any help :)
c linux usb
Subfire
source share