Skip to main content
filetrace files lists the files that processes have sent over the network, most recently active first: which process sent each file, to which address, how many bytes and by which method. Every row carries the confidence of the association between the file and the socket.

Usage

What it shows

Each row is one transfer record: one file sent by one process on one socket. BYTES is neither the size of the file nor the bytes read from it. Machine-readable formats carry all three numbers, as file.size, transfer.bytes_read and transfer.bytes_sent. Byte counts are what the local socket accepted, not bytes on the wire or acknowledged by the remote end. The confidence levels: File attribution and confidence explains the evidence behind each level. To see the bytes no file accounts for, use transfers; to see everything about one file, use inspect file.

Options

boolean
Only files that no longer have a directory entry.
boolean
Also list sent bytes with no associated file, as rows with FILE unknown and CONFIDENCE UNKNOWN.
number
Only this process.
string
Only processes with this name. * matches any run of characters. Alias: --name.
string
Only processes of this user, by name or numeric ID.
string
Only processes in this cgroup, by numeric ID or cgroup directory.
number
Only processes in this network, PID or mount namespace, given as the inode number that ls -Li /proc/<pid>/ns shows.
string
Only this file. * matches any run of characters, / included. Alias: --file.
string
Only files whose path matches this POSIX extended regular expression.
string
Only files at least this large, such as 100MB.
string
Only this remote address or CIDR network.
string
Only this local address or CIDR network.
number
Only this local or remote port.
string
default:"all"
Only this protocol: tcp, udp or all.
string
sendfile or read-write. splice, mmap and io_uring are accepted but not observed by this build; with them the command exits with 5 instead of printing an empty list.
string
exact, strong, inferred, unknown or all.
string
At least this many bytes sent, such as 1KB, 100MB or 1GB.
boolean
Only records still in progress: updated within the last 5 seconds.
boolean
Only records that are no longer in progress.
string
Only records active at or after this time: a duration such as 10m, 1h or 7d, or an RFC 3339 timestamp.
string
Only records that started at or before this time.
string
bytes, time, pid, rate, duration, process or file. Without it, the most recently active come first.
boolean
Show remote addresses by host name where a reverse DNS lookup finds one. The lookups tell the DNS resolver which addresses are being looked at.
number
Show at most this many rows.
string
default:"table"
table, json, jsonl, csv or quiet. Quiet prints one file path per row.
boolean
Short for --format json.
boolean
Short for --format jsonl.
string
Write to this file instead of standard output.
Byte counts cover a record’s whole observed lifetime; --since and --until select which records are listed. Filters describes the value syntax, and output formats the formats.

Examples

Files sent to a network with EXACT confidence:
The three largest transfers:
One file as JSON:
JSON output schema describes every field.

Exit codes