I want to learn more about udev rules, so I implemented a simple one, but I doesn't work:
/etc/udev/rules.d:
KERNEL=="sdb1"
ACTION=="add"
RUN+="~/test/exe.sh"
~/test/exe.sh:
#!/bin/bash
echo "USB plugged in" > ~/test/showup.txt
the .sh
file is executable, and I checked the flash drive's name via lsblk
. It is called sdb
and has a sdb1
partition.
I already looked up different tutorials, but can't find my mistake. I use Arch Linux in case that matters.
~
... – jasonwryan Jul 22 '17 at 22:53