Created
September 12, 2018 07:26
-
-
Save v-thomp4/62772d70ae4702deebd8253fe1eeb6fd to your computer and use it in GitHub Desktop.
CLEAN UP WHISPER DATABASE
This file contains hidden or 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
1. Delete old metrics of ours that haven't been written to for over 90 days | |
# just to satisfy my curiosity: how much disk space I will gain | |
find /data/db/whisper/ -name "*wsp" -mtime +90 -exec echo -n -e {}"\0" \; | du -hc --files0-from=- | |
# delete the files! | |
find /data/db/whisper/ -type f -mtime +90 -name "*wsp" -exec rm '{}' \; | |
2. Delete empty directories | |
# how many do we have? | |
find /data/db/whisper/ -type d -empty | wc -l | |
# remove them! | |
find /data/db/whisper/ -type d -empty -delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment