Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-12-2008, 06:50 AM   #1
LQ Newbie
Registered: Oct 2008
Posts: 6

Rep: Reputation: 0
Question How to detect usb storage arrival and its mount path

Hi, I am a newbi to linux,
i wana to write a program in C that can detect arrival of a usb flash memory. I want also to find the actual mount point of new inserted flash disk. can anyone help me?
thanks a lot
Old 10-12-2008, 08:10 AM   #2
Registered: Sep 2008
Location: Misawa AB, Japan
Distribution: Slackware
Posts: 191
Blog Entries: 2

Rep: Reputation: 40
It's possible to detect the insertion of a USB device simply by watching /var/log/dmesg /var/log/messages /var/log/syslog etc. There are also ways to include udev, hal, and/or messagebus hooks (see appropriate project websites).
Old 10-12-2008, 11:14 AM   #3
LQ Newbie
Registered: Oct 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks a lot. but there is not any appropriate API such as Windows?


mount, point, usb

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
Unable to detect USB storage device in SLED10 xeroblast SUSE / openSUSE 1 11-22-2007 09:06 PM
cannot detect Western Digital MyBook 250GB USB extrenal storage dbulka Linux - Newbie 5 09-12-2007 08:54 PM
How to mount usb storage devices phenixs Linux - Hardware 2 03-27-2007 05:37 PM
how to auto-mount usb storage mirto Slackware 7 01-05-2006 10:48 AM
Cannot mount usb storage under 2.6.9 stelmed Slackware 6 12-12-2004 08:34 AM

All times are GMT -5. The time now is 08:01 AM.

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