Code to Check How Many Blocks Mined

Does anyone know what to enter into a linux terminal for Zcashd to show total blocks mined (none stale)

You can see your mined blockes here:

~/zcash/./src/zcash-cli listunspent

I want total blocks not details if anyone has an idea to do this.

X Blocks nothing more

echo `src/zcash-cli listunspent | grep txid | wc -l` blocks
1 Like

Thanks for the help.

Edit : echo ~/zcash/./src/zcash-cli listunspent | grep txid | wc -l blocks
works for me