A CLI tool for FreeBSD / MacOS that monitors a directory for filesystem events and writes them to a logfile.
- C++ 98.2%
- Makefile 1.8%
| src | ||
| .gitignore | ||
| compile_commands.json | ||
| Makefile | ||
| README.md | ||
Logwatch
A simple MacOS / FreeBSD utility that monitors directories for filesystem events and writes them to a log file.
Introduction
I made this program as a test of my skills with program design and to learn more about FreeBSD / MacOS. In terms of functionality it is quite simple but also useful if you are doing system analysis.
The software was written in a mix of plain C and C++23 and uses kqueue to monitor the events.
Usage
# Writer
./logwatch "dir_to_watch" "output_file.bin"
# Reader
./logread "input_file.bin" # same as the output of the writer
Note: You must first have output from the writer to use the reader
References
These are some articles, docs and git repositories that helped me create this utility: