Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Clean Java hsperfdata files
# Looks for /tmp/hsperfdata_* files leaved by unclean Java processes
# shutdowns and remove them.
# This should be executed by a user without sufficient rights to delete
# other users files...
for hsperfdata in /tmp/hsperfdata_*/*; do
ps -p `basename ${hsperfdata}` &> /dev/null || rm -vf $hsperfdata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment