is there any shell command, can let me know, current open device or device already in operation.For example, I use minicom to open a device /dev/ttyUSB0 or /dev/ttyS0, after I use program open this device, how can I check it under shell it already open? I tried dmesg but seems doesn't work for me
how to know which device was open
shell;devices
I think lsof is the tool that should be used for.  It will list all the files that are being used by a process.May be fuser can also be used if you want do not know the process id. 