LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 04-06-2006, 07:26 AM   #1
b123coder
Member
 
Registered: Nov 2004
Location: india
Distribution: Fedora core 1
Posts: 67

Rep: Reputation: 15
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
 
Old 04-07-2006, 01:35 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
/usr/sbin/lsof | grep '/dev'

--- rod.
 
Old 04-08-2006, 07:17 AM   #3
b123coder
Member
 
Registered: Nov 2004
Location: india
Distribution: Fedora core 1
Posts: 67

Original Poster
Rep: Reputation: 15
hi,
Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/dev/hdc1 contains a file system with errors, Check Forced mvrieze Slackware 5 01-10-2012 10:24 AM
startx --> (EE) xf86OpenSerial: Cannot open device /dev/input/mice No such device. TB2 Linux - Software 2 04-04-2007 05:11 PM
/dev/tty0, /dev/tty1, /dev/tty10...and so on...which should be used for a device ??? b0nd Slackware 2 04-02-2006 08:14 AM
/dev (file type: socket device?) blackzone Linux - Networking 1 08-10-2004 04:15 AM
mkraid output "[uEUEMMno MD device file in /dev" bruce1271 Linux - Software 6 03-21-2004 09:25 PM


All times are GMT -5. The time now is 10:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration