Using lsof to Find Open Files

Written By
Web Webster
Web Webster
Nov 24, 2010

“One of the most useful utilities you’ll find on Linux and *nix
systems is lsof. Short for “list open files,” the lsof utility can
help identify which files are being used by any given application,
which network ports are open, and much more.

“The lsof utility has all manner of useful applications. My
first serious application of lsof was hunting down rootkits and IRC
bots that were deployed on shared Linux servers. A process would
show up in top or ps aux, but the executable didn’t seem to exist.
Using lsof, I could hunt down the scripts or executables used to
run the malware.

“You can do a lot with lsof, but let’s focus on a couple of
basics for starters. If you run just lsof, it will attempt to show
all files (which includes network sockets, pipes and special files)
that are open.”


Complete Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.