Skip to content

Instantly share code, notes, and snippets.

@BigAl
Created June 30, 2016 10:45
Show Gist options
  • Save BigAl/030fe02ded0c1f2b3defd9ffb393b932 to your computer and use it in GitHub Desktop.
Save BigAl/030fe02ded0c1f2b3defd9ffb393b932 to your computer and use it in GitHub Desktop.
Handy one liners
Checking for Deleted Files Held Open in UFS File Systems
To 'find' the particular offending process(es) with open but deleted files you can use
find /proc/*/fd -type f -links 0 -exec ls -l {} \;
which looks for files with zero links, i.e. that have been deleted but a running process still has the file open.
Using the PID from the /proc/<PID>/fd/xxxxx names returned you can determine if the process can be restarted without a server reboot.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment