From c372ead1271e10bd5dda6d20ee1e9291b4025708 Mon Sep 17 00:00:00 2001 From: olemorud Date: Tue, 13 Dec 2022 18:50:16 +0100 Subject: [PATCH] add README.md --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..08d9d4d --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ + +# Execution-counter +This program uses `inotify` ([man page](https://man7.org/linux/man-pages/man7/inotify.7.html)) to monitor file accesses for each file in $PATH. A potential use-case is to find which files are not needed in a docker-image. + + +## Build +``` +gcc exec_tracker.c -o exec_tracker +``` + + +## Usage +```sh +# Track number of times executables in PATH are accessed +./exec_tracker + +# Track number of times regular files in is accessed +./exec_tracker +``` + +## Acknowledgments +The code borrows heavily from the `inotify` manual page in the Linux Programmer's Manual. +