Skip to content

Instantly share code, notes, and snippets.

@biji
Last active November 15, 2019 04:12
Show Gist options
  • Save biji/6821a92398da4a7bd3cc6bf05a6ace88 to your computer and use it in GitHub Desktop.
Save biji/6821a92398da4a7bd3cc6bf05a6ace88 to your computer and use it in GitHub Desktop.
Check how many GB written to your SSD
#!/bin/sh
TOTALGB=`echo "scale=2; $(sudo /usr/sbin/smartctl -A /dev/sda | grep "Total_LBAs_Written" | awk '{print $10}') * 512 / 1073741824" | bc`
echo "$TOTALGB GB written"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment