Skip to content
Search

Inotifywait

lastmod 2026-02-04created 2026-02-042 edits

Watch specific files/directories

Simple Usage

# inotify-tools 설치 / Install inotify-tools
sudo apt install inotify-tools

# 특정 디렉토리 내 모든 파일 접근 감시 / Watch all file access in a directory
inotifywait -m -r /path/to/dir -e open,close,access,modify

# 특정 파일 하나만 감시 / Watch a single file
inotifywait -m /etc/passwd -e open,close

See also

  • lsof
  • fuser
  • strace
  • fuser - Find processes using a specific file/port
  • bpftrace/bcc - Minimal overhead, suitable for production environments
  • auditd - System-level audit logs (can be made persistent)
author Zer0 sitemap