Skip to content

Daemon that monitors a file/directory for filesystem events

License

Notifications You must be signed in to change notification settings

chibby0ne/daemon_inotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Daemon that uses inotify to monitor files/directories

Build Status

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

mkdir build
cd build
cmake .. -DBUILDDOC=1
make

or if using ninja (Recommended)

mkdir build
cd build
cmake .. -GNinja -DBUILDDOC=1
ninja

Usage

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
  • More user friendly log messages
  • Add systemd unit
  • Add log entries for deletion, modification and rename of file/directories

License

GNU GPLv2

About

Daemon that monitors a file/directory for filesystem events

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published