LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 09-06-2004, 03:17 AM   #1
appas
Member
 
Registered: Jul 2004
Posts: 72

Rep: Reputation: 15
monitoring directory to get the modified file names


Hi all,

I am writing a c program to monitor a directory looking for any changes in the files contained in the directory
and get the modified filename.
I am using sigaction to acheive this. My signal handler recieves a struct siginfo_t, I want to get the
modified filename from the struct siginfo_t. Is this possible or is there any way to get the modified filename.
 
Old 09-06-2004, 05:56 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
Try man 2 stat, then look at the st_mtime, st_atime and st_ctime fields of the resulting stat struct.
 
  


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
Filesystem modified or new installer monitoring software loadedmind Linux - Software 2 01-17-2006 01:18 PM
Tail Last Modified File in a Directory tyoungblood Linux - Software 3 08-12-2005 09:42 AM
Getting file names in a directory using C on linux. rajsun Programming 4 06-10-2005 01:47 AM
triggering bash script if directory modified cbb Linux - Software 1 10-23-2004 08:52 AM
Get directory stats when a file has been modified? marri Programming 2 05-13-2004 09:44 PM


All times are GMT -5. The time now is 09:44 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration