GNU/Linux Command – LSOF

lsof — LiSt Open Files.

Summary:

lsof lists all open files belonging to all active processes. An open file may be a regular file, a Dir, a special file, an executing text reference, a library, a stream or a network file (Internet socket, NFS file or UNIX domain socket).

Examples:
$ lsof -- List all open files. $ lsof -i -- List all open Internet files. $ lsof -U -- List all open Unix Domain files. $ lsof -u user1 -- List all files opened by User1. $ lsof -p 1234 -- List all files opened by process with PID 1234. $ lsof /dev/hda2 -- List all open files on device /dev/hda2. $ lsof -s -- List all open files with size. $ lsof -r 5 -- Repeat the command for every 5 Sec.
Read: man lsof (More examples are available)

Advertisements
Tagged with: ,
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: