Alternatives for "lsof" command?

I know of fuser, see if is available on your system.


The Unix Rosetta Stone is a good resource for this kind of questions. It mentions a few alternatives for lsof (see below). Do note however that lsof is the de facto standard application for what it does.

If all you want is to find the process ID(s) that have a particular file open, then you can use fuser on any POSIX-compliant system.

On operating systems with a /proc directory, you can query the files open by a process (the reverse from lsof's most common mode of operation) through information in /proc. Some operating systems have commands for that:

  • AIX: procfiles is shipped with the system (since AIX 5.2). See also AIX 5.2 performance tools update and Usage and examples of lsof, pfiles, procfiles commands.
  • Solaris: pfiles (existing since 2.5).

If you happen to run Solaris, an alternative to lsof, which isn't installed by default and might choke on ZFS, is pfiles.

eg:

pfiles /proc/*