LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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


Reply
  Search this Thread
Old 10-18-2011, 12:04 PM   #1
rahulrpai
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Rep: Reputation: Disabled
Monitoring a file for updates


Hi All,

I am new to Linux, but have been doing some background work for checking CDC-ACM interaction on Linux.

My USB device gets recognized as /dev/ttyACM0. I can manually read this as "cat /dev/ttyACM0"

However, this external device will keep writing into this file, i want to get an update in a c++ program as an when this happens.

Can anyone help me?
 
Old 10-18-2011, 02:15 PM   #2
JSkywalker
Member
 
Registered: Aug 2007
Distribution: openSUSE 12.1
Posts: 96

Rep: Reputation: 24
this is not C++, but you could try 'man inotifywait', en read if that is of help....
 
1 members found this post helpful.
Old 10-18-2011, 11:33 PM   #3
rahulrpai
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi,

Thanks for your reply!

But, overall requirement being that i have to do this in a c++ program :-)
 
Old 10-19-2011, 01:53 PM   #4
JSkywalker
Member
 
Registered: Aug 2007
Distribution: openSUSE 12.1
Posts: 96

Rep: Reputation: 24
than you probably need the source code of 'inotify'...
i think it can be found here: https://github.com/rvoicilas/inotify-tools/wiki/
 
  


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
monitoring file for changes schentor Programming 4 02-09-2006 11:57 PM
File Monitoring vnbenvn Programming 1 05-24-2005 06:01 AM
bandwidth monitoring file !! hitesh_linux Linux - Software 12 01-26-2005 02:12 PM
File Monitoring App? embsupafly Linux - Software 1 12-18-2003 12:15 PM
monitoring file system Tinkster Linux - Security 14 06-09-2002 05:25 AM


All times are GMT -5. The time now is 01:06 PM.

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