This is a mirror of official site: http://jasper-net.blogspot.com/

Find open files in linux using lsof

| Wednesday, January 19, 2011
Deleting a file that has been opened by another process in linux does not free up disk space. Running the df or du commands will indicate conflicting results. Closing / killing the process that opened the files will release the space on the disk. The lsof command can help you track, say the top ten open files in your OS sorted by disk space. If you ever run into trouble with large open files, use the following command

Top ten open files:
lsof / | awk ‘{if($7 > 1048576) print $7/1048576 “MB” ” ” $9 }’ | sort -n -u | tail

Output:

3.8054MB /usr/lib/libgtk-x11-2.0.so.0.2200.0
4.28024MB /usr/share/icons/hicolor/icon-theme.cache
8.17912MB /usr/lib/locale/locale-archive
8.86022MB /var/lib/apt/lists/lk.archive.ubuntu.com_ubuntu_dists_maverick_main_binary-i386_Packages
11.4047MB /usr/lib/flashplugin-installer/libflashplayer.so

Read more: CertPal

Posted via email from .NET Info

0 comments: