4
votes
3answers
2k views

Run a command when a disk is inserted (Linux)

I would like to automatically run my own command any time a drive is inserted under Linux (including USB drives, for example). Obviously the simplest solution would be to regularly poll and check for ...