Created
July 19, 2016 18:51
-
-
Save elico/5ae8920a4fbc813b415f8304cf1786db to your computer and use it in GitHub Desktop.
A script to verify how many private objects are being stored in the store
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
#!/usr/bin/env bash | |
#ls /mnt/wu/storedata/header/v1/ | xargs -l1 grep -i "public" | |
#ls /mnt/wu/storedata/header/v1/ | xargs -l1 grep -i "private" | |
# Change the directory to reflect your use case | |
DIR=/mnt/wu/storedata/header/v1/ | |
FILES=($(/bin/ls "$DIR")) | |
PUBCOUNTER=0 | |
PRICOUNTER=0 | |
ALLCOUNTER=0 | |
for AFILE in ${FILES[@]} | |
do | |
# echo $AFILE | |
grep -i "public" $AFILE >/dev/null && let PUBCOUNTER=PUBCOUNTER+1 | |
grep -i "private" $AFILE >/dev/null && let PRICOUNTER=PRICOUNTER+1 | |
let ALLCOUNTER=ALLCOUNTER+1 | |
done | |
echo "PUBLIC => $PUBCOUNTER" | |
echo "PRIVATE => $PRICOUNTER" | |
echo "ALL => $ALLCOUNTER" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment