Visit Jeremy's Blog.
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 05-13-2004, 10:30 AM   #1
Registered: May 2004
Posts: 38

Rep: Reputation: 15
Get directory stats when a file has been modified?

I am currently trying to poll for changes in a directory, only by looking at the directory status (modification time). I have many files in many directories and I need to know what file has been changed and in what directory, without scanning all the directories.
Is there anything in the directory file descriptor that encompasses this situation.

Old 05-13-2004, 10:46 AM   #2
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
This may be able to do what you want... I'm sure there are many others out there or you could write your own daemon to watch a folder/folders.
Old 05-13-2004, 08:44 PM   #3
Senior Member
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 59
If you want to re-invent the wheel, read 'man 2 stat'.


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
Tail Last Modified File in a Directory tyoungblood Linux - Software 3 08-12-2005 08:42 AM
equivalent of windows directory properties providing basic stats on contents alpha21 Linux - Newbie 9 05-01-2005 08:09 AM
triggering bash script if directory modified cbb Linux - Software 1 10-23-2004 07:52 AM
monitoring directory to get the modified file names appas Programming 1 09-06-2004 04:56 AM
vi won't save modified file. mimsmall Linux - General 1 03-26-2004 10:04 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:49 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