The lsof command

  Uncategorized

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-.

Views: 0

LEAVE A COMMENT

What is the capital of Egypt? ( Cairo )