Kit BashirUnixbigot@aus.social
Jul 1, 2026, 4:24 AM#HackOfTheDay 'cyme' (cargo install cyme, it's a rust program) is a smarter colour-enabled descendent of 'lsusb' which lists the usb devices on your computer. On linux I habitually run 'sudo dmesg -w' when working with USB devices to see the system log of device connects and disconnects. On Mac it's a pain to get the same. So I wrote this oneliner that shows the most recently attached or removed USB device.
```
rm usb-was ; touch usb-was ; while : ; do now=`date`; cyme -t | sed -e '/T2Bus /,$d' >usb-now ; diff usb-was usb-now >/dev/null ; if [ $? -ne 0 ] ; then clear ; cat usb-now ; echo "$now CHANGE:" ; diff usb-was usb-now ; cp usb-now usb-was ; else echo -n "$now \r" ; fi ; sleep 1 ; done
```
