Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: To list largest currently open files and the name of the process holding file  (Read 1691 times)

0 Members and 1 Guest are viewing this topic.

jamesj

  • Guest
lsof  meaning "list open files", which is used in many Unix-like systems to report a list of all open files and the processes that opened them.

Following can be used to show the largest 10 currently open files, the size of those files in Megabytes, and the name of the process holding the file open.

# lsof / | awk '{ if($7 > 1048576) print $7/1048576 "MB" " " $9 " " $1 }' | sort -n -u | tail



« Last Edit: June 19, 2017, 02:48:59 pm by jamesj »