filegone(8) System Manager's Manual filegone(8)

# [NAME](#NAME)

filegone - Trace why file gone (deleted or renamed). Uses Linux eBPF/bcc.

# [SYNOPSIS](#SYNOPSIS)

**filegone \[-h] \[-p PID]**

# [DESCRIPTION](#DESCRIPTION)

This traces why file gone/vanished, providing information on who deleted or renamed the file.

This works by tracing the kernel vfs\_unlink() , vfs\_rmdir() , vfs\_rename functions.

Since this uses BPF, only the root user can use this tool.

# [REQUIREMENTS](#REQUIREMENTS)

CONFIG\_BPF and bcc.

# [OPTIONS](#OPTIONS)

[-h](#h)

Print usage message.

[-p PID](#p)

Trace this process ID only (filtered in-kernel).

# [EXAMPLES](#EXAMPLES)

[Trace all file gone events](#Trace)

\# **filegone**

[Trace file gone events caused by PID 181:](#Trace~2)

\# **filegone -p 181**

# [FIELDS](#FIELDS)

[TIME](#TIME)

Time of the event.

[PID](#PID)

Process ID that renamed/deleted the file.

[COMM](#COMM)

Process name for the PID.

[ACTION](#ACTION)

action on file: 'DELETE' or 'RENAME'

[FILE](#FILE)

Filename.

# [OVERHEAD](#OVERHEAD)

This traces the kernel VFS file rename and delete functions and prints output for each event. As the rate of this is generally expected to be low (&lt; 1000/s), the overhead is also expected to be negligible. This is from bcc.

https://github.com/iovisor/bcc

Also look in the bcc distribution for a companion \_examples.txt file containing example usage, output, and commentary for this tool.

# [OS](#OS)

Linux

# [STABILITY](#STABILITY)

Unstable - in development.

# [AUTHOR](#AUTHOR)

Curu Wong

# [SEE ALSO](#SEE_ALSO)

[filelife(8)](/man/enterprise-packages/bcc/filelife.8)

2022-11-18 USER COMMANDS

---

Document: filegone(8) from bcc 0.37.0-r3 (Chainguard OS)
Source: https://github.com/iovisor/bcc
