how to watch the usb port

I want to watch the USB ports.
If any device is connected to the USB port I want to take the name of the device and
I want to log the device name. how to watch all the USB ports.
How to find the device is connected in which usb port.

If you're on Linux and have udev, this can be accomplished by adding a rule to udev.

1 Like