LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   how to check that any /dev/ device file in use (https://www.linuxquestions.org/questions/programming-9/how-to-check-that-any-dev-device-file-in-use-432272/)

b123coder 04-06-2006 07:26 AM

how to check that any /dev/ device file in use
 
Hi,
I want to know that how can i check that any say /dev/lp0 or /dev/dsp is in use by any other program? So that i cannot use it in my program? I mean i want to have check condition that check whether some other process is accessing that device file

theNbomr 04-07-2006 01:35 PM

/usr/sbin/lsof | grep '/dev'

--- rod.

b123coder 04-08-2006 07:17 AM

hi,
Thanks


All times are GMT -5. The time now is 12:14 PM.