Skip to content

Instantly share code, notes, and snippets.

@Grauwolf
Forked from addisonj/rm-corrupt.sh
Last active January 3, 2016 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Grauwolf/8434457 to your computer and use it in GitHub Desktop.
Save Grauwolf/8434457 to your computer and use it in GitHub Desktop.
#!/bin/bash
directory='/var/lib/graphite/whisper'
for file in $(find $directory -type f -name '*.wsp' -print); do
whisper-info $file > /dev/null 2>&1
[ $? -ne 0 ] && rm -v $file
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment