#processes #sockets #process-file #lsof #fuser

ofiles

Identify processes that have opened files or sockets

3 unstable releases

0.2.0 Oct 22, 2020
0.1.1 Oct 15, 2020
0.1.0 Apr 24, 2020

#1015 in Filesystem

Download history 5/week @ 2023-12-18 16/week @ 2023-12-25 4/week @ 2024-01-01 28/week @ 2024-01-08 20/week @ 2024-01-15 15/week @ 2024-01-22 2/week @ 2024-01-29 22/week @ 2024-02-05 23/week @ 2024-02-12 20/week @ 2024-02-19 44/week @ 2024-02-26 29/week @ 2024-03-04 89/week @ 2024-03-11 59/week @ 2024-03-18 36/week @ 2024-03-25 96/week @ 2024-04-01

285 downloads per month
Used in 4 crates (2 directly)

BSD-3-Clause

13KB
229 lines

ofiles

crates.io Rust Documentation license

A tiny library for determining what process has a file opened for reading/writing/etc. I wrote this for another project but I hope will be useful in other applications.

Example:

use ofiles::opath;

let mut pids = opath("/path/to/a/file").unwrap();

// Now we have a Vec of process ID's that have the `/path/to/a/file` open
for pid in pids {
    println!("Process {} has {} open!", pid, "/path/to/a/file");
}

Dependencies

~2MB
~38K SLoC