FreeBSD Install lsof To Displays Information About Files Open to Unix processes

by on July 16, 2008 · 0 comments· LAST UPDATED July 16, 2008

in , ,

Q. How do I install the free, open-source, Unix administrative tool called lsof (for LiSt Open Files) under FreeBSD operating system to displays information about files open to Unix processes?

A. lsof lists information about files opened by processes
for the varios UNIX dialects. An open file may be a regular file, a directory, a block special file, a character special file, an executing text reference, a library, a stream or a network file (Internet socket, NFS file or UNIX domain socket.) A specific file or all the files in a file system may be selected by path.

FreeBSD install lsof package

Type the following command to update current ports collection and install lsof from ports:
# portsnap fetch update
# cd /usr/ports/sysutils/lsof
# make install clean

Now you can use lsof commad, enter:
# lsof
# lsof -i -U
# lsof -i 4 -a -p 2053
# lsof -i 6
$ man lsof

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 0 comments… add one now }

Leave a Comment

Tagged as: , , , , , , , , , , , , , , , ,

Previous Faq:

Next Faq: