Skip to main content
filetrace transfers lists transfer records, most recently active first, with the ID of each. Unlike files, it also lists the bytes a socket sent that no file accounts for, so the rows add up to everything the processes sent.

Usage

What it shows

A transfer record with a file is one file sent by one process on one socket, and its ID is tr_ followed by a hexadecimal number. A row with FILE unknown holds what one socket sent beyond the bytes attributed to files; its ID is tr_s followed by the socket ID in hexadecimal (tr_s1001 is socket 4097). Both kinds of ID appear as transfer_id in machine-readable output, and --format quiet prints one ID per row. Unattributed rows are left out when a filter can only match files: --path, --path-regex, --min-size, --deleted, --method, and a --confidence other than unknown or all.

Options

boolean
Only files that no longer have a directory entry.
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 transfer ID 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. See filters and output formats.

Examples

Only the bytes that no file accounts for:
In JSON, a record with a file has "event":"file_transfer". Unattributed bytes have "event":"network_transfer", no file object, and no method, operations or evidence:

Exit codes