logwrites3
Library for intercepting and recording writes to files, and optionally saving backups of files that otherwise would have been overwritten.
Usage
Bash, Ksh and Bourne shell syntax:
INSTALL_LOG=log_file LD_PRELOAD=/usr/lib/logwrites.so command SAVE_ DO_BACKUPS=1 INSTALL_LOG=log_file LD_PRELOAD=/usr/lib/logwrites.so command
C Shell syntax:
env INSTALL_LOG=log_file LD_PRELOAD=/usr/lib/logwrites.so shell_command env DO_BACKUPS=1 INSTALL_LOG=log_file LD_PRELOAD=/usr/lib/logwrites.so shell_command
Overview
logwrites is a library that intercepts the open(2), link(2), rename(2), symlink(2), unlink(2), mkdir(2), mknod(2), and truncate(2) system calls and records these events in a file after successful execution of the system call. It can also optionally save a backup copy of any file that would otherwise have been overwritten by open(2).
Arguments
Arguments to logwrites are passed through the following environmental variables.
- LOG_FILE
-
The name of the file in which to record the file modification events.