How to know which device is connected in which /dev/ttyUSB port
问题 I am using two Wavecom 16-port modems. When I attach the modems to my system, I am able to list of all the /dev/ttyUSB port names, but also I want to know, which modem is containing ports 0 to 16 and which one is containing ports 17 to 32? The modems may be attached and removed many times in a single day, so I also want to keep logs when modems get disconnected and connected again. Any idea how to do so using c/c++/php script/node.js ? 回答1: You can get this information from the sys filesystem