Questions tagged [file-monitoring]
87 questions
25
votes
5 answers
Is there a sophisticated file system monitor for Java which is freeware or open source?
I'm looking for a Java library which can notify me about changes on the file system.
I found some free libraries, but they all use brute-force detection, i.e. polling in regular intervals. And the other ones are always commercial.
What I'm looking…

Daniel Rikowski
- 71,375
- 57
- 251
- 329
18
votes
1 answer
monitoring file and directory access on linux
Do you know of any linux program, that would monitor accesses to directories and files in the filesystem? I would like to able to produce some report of how many times certain files were accessed in some period?

gruszczy
- 40,948
- 31
- 128
- 181
18
votes
1 answer
Monitoring file changes in C++ on Linux
I am working with Linux, and I have a directory which has subdirectories and there are files inside subdirectories.
I have to monitor the changes in the file. In C++ I am using Boost. I go through all the directories every 30 seconds and check the…

user1566277
- 435
- 2
- 5
- 11
11
votes
4 answers
How to get a file close event in python
Using python 2.7 on windows 7 64 bit machine.
How to get a file close event:
when file is opened in a new process of file opener (like notepad, wordpad which opens file everytime in new process of wordpad)
when file is opened in a tab of file…

imp
- 1,967
- 2
- 28
- 40
10
votes
2 answers
How can I log low-level OS file transactions in C#?
Since File/Process Monitor falls short in terms of filtering and unnecessary duplication when logging, I want to recreate what that program does and log all Windows file operations live in realtime.
I want to record various attributes such as the…

Dan W
- 3,520
- 7
- 42
- 69
8
votes
4 answers
OS-independent API to monitor file system?
I would like to experiment with ideas about distributed file synchronization/replication. To make it efficient when the user is working, I would like to implement some kind of daemon to monitor changes in some directory (e.g.…

Alex. S.
- 143,260
- 19
- 55
- 62
6
votes
3 answers
Move file to another directory once it is done transferring
I have a video encoding script that I would like to run as soon as a file is moved into a specific directory.
If I use something like inotify, how do I ensure that the file isn't encoded until it is done moving?
I've considered doing something…

javanix
- 1,270
- 3
- 24
- 40
4
votes
1 answer
How to detect a file has been truncated while reading
I'm reading lines from a group of files (log files) following them as they are written using pyinotify.
I'm opening and reading the files with python native methods:
file = open(self.file_path, 'r')
# ... later
line = file.readline()
This is…

Philip Couling
- 13,581
- 5
- 53
- 85
4
votes
2 answers
inotify: are the events reported in strictly the same order as they have occured in the file system?
I'm using inotify to monitor various directories on various partitions (which are possibly located on different hard disks). To be sure to have collected all events which have occurred until a certain point in time T, I'm touching a special file in…

mstrap
- 16,808
- 10
- 56
- 86
4
votes
3 answers
Monitor file/folders to get change notifications in UNIX
The requirement is to monitor multiple folders and file for any changes in UNIX. I need to be able to hook my java code for any changes like create/modify/delete. Could anybody suggest any java based frameworks to do the same?

Mithun
- 7,747
- 6
- 52
- 68
3
votes
2 answers
how to call my dll from windows service?
I created a c# library file,that will go to local path for e.g(c:\test.txt) find the file and upload to ftp server.
For testing i just called the dll from console app but how i can run as a windows service,that will run continously ?
I suppose to…

Usher
- 2,146
- 9
- 43
- 81
3
votes
3 answers
Java: How to wait for fileChanged to execute?
I'd like to have my thread (the main/EDT) wait until changes to a file occur and then wait. DefaultFileMonitor extends Runnable and hence runs in a thread of its own. Here is a SSCE:
import java.io.File;
import org.apache.commons.vfs.*;
import…

simpatico
- 10,709
- 20
- 81
- 126
3
votes
1 answer
Continiously tail a local file for new lines using Javascript in a browser
I have a file that gets new lines appended to it frequently. I want to create a web application running in the browser using javascript that will be able to detect changes on that local file and print the new content that is added on the file.
My…

John Papastergiou
- 999
- 2
- 14
- 29
3
votes
3 answers
Asynchronous reading on the inotify descriptor failed
I'm writing a monitoring-file program based on the source code: https://github.com/kvikas/file-monitor-service/blob/master/
My program uses boost::asio::stream_descriptor::async_read_some() for asynchronous reading from the inotify descriptor…

khanhhh89
- 317
- 5
- 19
2
votes
2 answers
Reading updated files on the fly in Python
I'm writing two Python scripts that both parse files. One is a standard unix logfile and the other is a binary file. I'm trying to figure out the best way to monitor these so I can read data as soon as they're updated. Most of the solutions I've…

fbd39j
- 35
- 2
- 4