LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Closed Thread
  Search this Thread
Old 04-17-2009, 02:02 AM   #1
gyuvarajan
LQ Newbie
 
Registered: Apr 2009
Posts: 6

Rep: Reputation: 0
Question USB Pendrive detection


Hi all,

I need to develop a SW in which the SW has to determine when any USB is connected,it has to identify and do the Read and write operation with the pendrive.
I have to identify the moment when pendrive is connected.System has no GUI only Black Box.
Im using RHEL with Kernel 2.6.18.

My question is how to identify if pendrive is connected.Is any System flag or some other thing will set In OS?

Please help me out to solve this problem



Many Thanks in Advance
Yuvi
 
Old 04-17-2009, 03:52 AM   #2
kandiru
Member
 
Registered: Mar 2009
Location: Genoa, Italy
Distribution: Slackware
Posts: 33

Rep: Reputation: 16
Hello,

when you connect a usb pendrive to your linux box you should see activity in the file /var/log/messages.

Try to do the follwing command

Quote:
sudo tail -f /var/log/messages
connect the usb drive and see what happens.

Or you can give as root the command "dmesg".

In what language are you developing? If you are using the C language you could find something useful here

http://cboard.cprogramming.com/linux...nt-path-c.html

Hope this will help

Bye

David
 
Old 04-17-2009, 04:37 AM   #3
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Did your instructor implement a timeline for you and other students to draft a perspective?
 
Old 04-18-2009, 09:16 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

See also the forum rules about homework
 
  


Closed Thread


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
Problem with usb pendrive and usb modem ZTE ZXDSL 852 AM33N Linux - Hardware 3 12-10-2008 04:25 AM
usb pendrive in dell inspiron with 8 usb ports sergioricardo Linux - Hardware 4 02-12-2008 12:05 PM
Conflicting USB mouse & usb pendrive on Slackware 11.0 aruntom55 Slackware 3 08-26-2007 02:34 AM
usb pendrive, again. dve Linux - Hardware 15 12-12-2006 04:58 AM
usb pendrive carmelo Slackware 3 04-08-2006 11:09 AM


All times are GMT -5. The time now is 04:54 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration