How To Start Scripts On USB-Connect

Having a script executed when a USB device is inserted can be quite helpful. I, for example, have an export script that syncs files to a flash drive without any interaction (except putting the drive in, of course). Here's how you do it: Adding The Rule In /etc/udev/rules.d/ we add a rules-file.