https://github.com/olemorud/execution-counter
Program to track number of times executables in $PATH are executed
https://github.com/olemorud/execution-counter
Last synced: about 2 months ago
JSON representation
Program to track number of times executables in $PATH are executed
- Host: GitHub
- URL: https://github.com/olemorud/execution-counter
- Owner: olemorud
- Created: 2022-12-13T17:34:45.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-20T10:34:36.000Z (about 2 years ago)
- Last Synced: 2025-02-09T02:41:12.548Z (3 months ago)
- Language: C
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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.