mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-02 03:42:48 +00:00
26 lines
522 B
Plaintext
26 lines
522 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, osx]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# opensnoop
|
|
|
|
> Track file opens on your system.
|
|
> More information: <https://keith.github.io/xcode-man-pages/opensnoop.1m.html>.
|
|
|
|
- Print all file opens as they occur:
|
|
|
|
`sudo opensnoop`
|
|
|
|
- Track all file opens by a process by name:
|
|
|
|
`sudo opensnoop -n "{{process_name}}"`
|
|
|
|
- Track all file opens by a process by PID:
|
|
|
|
`sudo opensnoop -p {{PID}}`
|
|
|
|
- Track which processes open a specified file:
|
|
|
|
`sudo opensnoop -f {{path/to/file}}`
|