fse_dump
FSEvents files are written to disk by macOS APIs and contain historical records
of file system activity that occurred for a particular volume. They can be
found on devices running macOS and devices that were plugged in to a device
running macOS. fse_dump can be used to parse FSEvents files from the
/System/Volumes/Data/.fseventsd/ on a live system or FSEvents files
extracted from an image.
Features
- Parse FSEvents files from macOS (versions 1, 2, and 3)
- Export to multiple formats: CSV, JSON, YAML
- Filter events by path (regex) and flags
- Compress output with gzip or zstd
- Watch mode for real-time parsing of new FSEvents files
- Generate unique path/operation summaries
- Fast parallel processing with memory-efficient design
Installation
From crates.io
From source
With optional features
# Build with zstd compression support
# Build with watch mode (requires notify)
# Build with all features
Quick Start
Parse FSEvents to JSON
# Parse default FSEvents directory to JSON
# Parse with compression
# Parse specific files
Filter Events
# Filter by path (regex)
# Filter by any of the specified flags
# Filter requiring all specified flags
# Combine filters
Watch Mode
# Watch for new FSEvents files and output as JSON
# Watch with filters
Usage
Usage: fse_dump <COMMAND>
Commands:
dump Dump fsevents file into the wanted output files/format
watch Watch for new fse files, parse them, and write them to the desired output
generate Outputs shell completions for the desired shell
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
Dump Command
The dump command parses FSEvents files and outputs them in various formats.
Arguments
[FILES]...- The FSEvents files to parse (default:/System/Volumes/Data/.fseventsd/)- Can be individual files or directories
- Directories are scanned for files with hex-only filenames
- Files are sorted by name before processing
Output Format Options
Individual File Output (creates output file next to each input file):
--csvs- Create.csvfile for each FSEvents file--jsons- Create.jsonfile for each FSEvents file--yamls- Create.yamlfile for each FSEvents file
Combined Output (all records in one file):
-c, --csv <FILE>- Write all records to a single CSV file-j, --json <FILE>- Write all records to a single JSON file-y, --yaml <FILE>- Write all records to a single YAML file-u, --uniques <FILE>- Write unique paths with combined operations to CSV
Use - as the filename to write to stdout:
|
Compression Options
Automatic Compression (based on file extension):
# Gzip compression (automatic)
# Zstd compression (automatic, requires zstd feature)
Force Compression:
--gzip- Force gzip compression (even for stdout)--zstd- Force zstd compression (requires zstd feature)-l, --glevel <0-9>- Gzip compression level (default: 7)--zlevel <0-20>- Zstd compression level (default: 10)--zthreads <N>- Zstd threads (default: 2, 0 to disable)
Time Filtering
-d, --days <N>- Only process files modified in the last N days (default: 90)- Set to 0 to process all files regardless of age
- Based on file modification/creation time
Event Filtering
Filter which events are included in the output:
Path Filtering:
-p, --path-filter <REGEX>- Only include events matching the regex pattern
# Only PDF files
# Only files in /Users directory
# Multiple patterns (use regex alternation)
Flag Filtering:
-f, --any-flags <FLAG>...- Include events with ANY of these flags--all-flags <FLAG>...- Include events with ALL of these flags
These options are mutually exclusive.
Available Flags:
| Flag | Description |
|---|---|
FolderEvent |
Event occurred on a folder |
Mount |
Volume was mounted |
Unmount |
Volume was unmounted |
EndOfTransaction |
End of a transaction |
LastHardLinkRemoved |
Last hard link to file removed |
HardLink |
Hard link created |
SymbolicLink |
Symbolic link created |
FileEvent |
Event occurred on a file |
PermissionChange |
Permissions were changed |
ExtendedAttrModified |
Extended attributes modified |
ExtendedAttrRemoved |
Extended attributes removed |
DocumentRevisioning |
Document versioning event |
ItemCloned |
Item was cloned |
Created |
File/folder was created |
Removed |
File/folder was removed |
InodeMetaMod |
Inode metadata modified |
Renamed |
File/folder was renamed |
Modified |
File/folder was modified |
Exchange |
Files exchanged |
FinderInfoMod |
Finder info modified |
FolderCreated |
Folder was created |
Flag names are case-insensitive.
Examples:
# Find all file creation or removal events
# Find all modified files (not folders)
# Find files created in the Documents folder
# Find permission changes on system files
Complete Examples
# Parse last 30 days to compressed JSON
# Create CSV and JSON for each FSEvents file
# Export unique paths to CSV
# Parse specific file to stdout with filters
# Multiple outputs with compression
Watch Command
The watch command monitors directories for new FSEvents files and parses them in real-time.
Arguments
[WATCH_DIRS]...- Directories to watch (default:/System/Volumes/Data/.fseventsd/)
Options
-o, --format <FORMAT>- Output format:csv,json, oryaml(default:json)-P, --pretty- Pretty-print JSON output (multi-line formatting)--poll- Use polling instead of native file system events (slower but more compatible)
Compression options (same as dump command):
--gzip,--zstd,-l, --glevel,--zlevel,--zthreads
Filtering options (same as dump command):
-p, --path-filter <REGEX>-f, --any-flags <FLAG>...--all-flags <FLAG>...
Examples
# Watch default directory and output JSON to stdout
# Watch with pretty-printed JSON
# Watch and filter for document changes
# Watch custom directory with CSV output
# Watch with compression (pipe to file)
Generate Command
Generate shell completion scripts for various shells.
Supported Shells
bashelvishfishpowershellzsh
Examples
# Generate completions for bash
# Generate completions for zsh
# Generate completions for fish
Output Format
Record Fields
Each FSEvents record contains the following fields:
path- Full path to the file/folderevent_id- Unique event identifier (hex format if built withhexfeature)flags- Human-readable flag names separated by|alt_flags- Alternative flag interpretation (if built withalt_flagsfeature)node_id- Inode number (v2 and v3 only, hex format if built withhexfeature)extra_id- Additional ID (v3 only, requiresextra_idfeature)
Unique Output Format
The --uniques option produces aggregated records:
path,counts,flags
/Users/alice/file.txt,5,"FileEvent | Modified | Created"
/Users/alice/Documents,3,"FolderEvent | Modified"
path- The file/folder pathcounts- Number of events for this pathflags- Combined flags (bitwise OR of all events)
Advanced Usage
Filtering Complex Scenarios
Find all deletions in user directories:
Find renamed files (with old and new names):
Monitor system configuration changes:
Find cloned/copied files:
Combining with Other Tools
jq for JSON processing:
# Extract just the paths
|
# Find events for a specific user
|
# Count events by flag
| | |
grep/awk for quick filtering:
# Find all PDF operations
|
# CSV processing with awk
|
Performance Tips
- Use compression for large outputs to save disk space
- Use
--daysto limit processing to recent files - Apply filters early with
--path-filterand--any-flagsto reduce output size - Use CSV for the most compact output format
- Use
--uniqueswhen you only need summary statistics
Forensics Use Cases
Timeline analysis:
# Export everything from last 7 days
Malware detection (find suspicious file operations):
# Find new executables
# Find hidden files
Data exfiltration (find removable media):
# Monitor mounts/unmounts
User activity:
# Monitor specific user's home directory
Building from Source
Features
Optional features can be enabled during build:
zstd- Enable zstd compression supportwatch- Enable watch mode for real-time monitoringhex- Output numeric IDs in hexadecimal formatalt_flags- Include alternative flag interpretationsextra_id- Include extra_id field from v3 files
# Build with specific features
# Build with all features
Development
# Run tests
# Run with debug logging
RUST_LOG=debug
# Check code
References
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.