https://github.com/chibby0ne/daemon_inotify
Daemon that monitors a file/directory for filesystem events
https://github.com/chibby0ne/daemon_inotify
daemon inotify monitor
Last synced: 8 months ago
JSON representation
Daemon that monitors a file/directory for filesystem events
- Host: GitHub
- URL: https://github.com/chibby0ne/daemon_inotify
- Owner: chibby0ne
- License: gpl-2.0
- Created: 2017-08-27T20:00:43.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-03T03:17:10.000Z (over 7 years ago)
- Last Synced: 2024-12-31T19:01:10.264Z (9 months ago)
- Topics: daemon, inotify, monitor
- Language: C
- Homepage:
- Size: 47.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Daemon that uses inotify to monitor files/directories
[](https://travis-ci.org/chibby0ne/daemon_inotify)
A daemon that monitors for events in a given file/directory, and informs the
user of the changes in the log.Not very useful but I always wanted to use inotify for something...
At the moment it only detects/logs file and directory creation.
# Build
```bash
mkdir build
cd build
cmake .. -DBUILDDOC=1
make
```or if using [ninja](https://ninja-build.org/) (Recommended)
```bash
mkdir build
cd build
cmake .. -GNinja -DBUILDDOC=1
ninja
```## Usage
```bash
daemon_inotify FILENAME
Where FILENAME is the directory or file to watch (Required argument)
```If something like this happens:
```
cp backup_dr_automated_testing.vp8.webm DIR
cp -r Richard_Feynman DIR
```Example log:
```
[Wed Feb 21 23:20:28 2018] File created: backup_dr_automated_testing.vp8.webm
[Wed Feb 21 23:20:33 2018] Directory created: Richard_Feynman
```## Improvements
- [ ] Using variable number of arguments
- [x] More user friendly log messages
- [ ] Add systemd unit
- [ ] Add log entries for deletion, modification and rename of file/directories## License
GNU GPLv2