Created
August 7, 2012 15:08
-
-
Save nicoulaj/3286172 to your computer and use it in GitHub Desktop.
Clean Java hsperfdata files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# 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 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment