First part displays info about the pen drive on the kernel log. The second part will read and write to the USB device via the device file. I have used Loadable kernel module (LKM). LKMs are pieces of ...