if I insert a U-disk into the device, How can I know the U-disk had inserted? Thank you!
- posted
15 years ago
if I insert a U-disk into the device, How can I know the U-disk had inserted? Thank you!
you can type "dmesg" after you insert a u-disk , to find the dev name of the u-disk and type mount command for example: mount /dev/sda /mnt/usb /mnt/usb is your mount point sda is the dev name of the u-disk
Create a udev rule that starts a specific programm and/or shell script when one insert a USB mass storage device:
KERNEL=="sd[a-z]*", SUBSYSTEMS=="usb", RUN+="/bin/bash /usr/local/sbin/do_something"
In the "do_something" script you can do whatever you want.
jbe
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.