1. Computing & Technology

Linux System Administrator's Guide

From

7.1.5. The lsof command

The lsof command will print out a list of every file that is in use. Since Linux considers everythihng a file, this list can be very long. However, this command can be useful in diagnosing problems. An example of this is if you wish to unmount a filesystem, but you are being told that it is in use. You could use this command and grep for the name of the filesystem to see who is using it.

Or suppose you want to see all files in use by a particular process. To do this you would use lsof -p -processid- .

* License

* Introduction to Linux Index

Related Searches lsof grep filesystem linux

©2012 About.com. All rights reserved.

A part of The New York Times Company.