Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 09-06-2004, 02:17 AM   #1
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, 04:56 AM   #2
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.


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 12:18 PM
Tail Last Modified File in a Directory tyoungblood Linux - Software 3 08-12-2005 08:42 AM
Getting file names in a directory using C on linux. rajsun Programming 4 06-10-2005 12:47 AM
triggering bash script if directory modified cbb Linux - Software 1 10-23-2004 07:52 AM
Get directory stats when a file has been modified? marri Programming 2 05-13-2004 08:44 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:59 PM.

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