did anyone know howto auto mount the u disk in embedded linux system

if I insert a U-disk into the device, How can I know the U-disk had inserted? Thank you!

Reply to
misty
Loading thread data ...

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

Reply to
simon111

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

Reply to
Juergen Beisert

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.