Vote
Bury
10

Show free disk space and capacity

Posted in System by matt 253 days ago
This Geeklet shows how much free disk space you have left.

"disk0s2" in the command is the identifier for the hard drive. Your's might be different, so you can check using Disk Utility (located in Applications/Utilities). Just click on the hard drive in the list on the left and choose Get Info... from the File menu (Command-I). The Disk Identifier property is near the top of the info window.

The second part of the command is awk which rearranges the output. You can change this arround. Just make sure all text is inside double-quotes, and all variables (e.g. $2) are outside. $2 gives the capacity, $3 gives the used, $4 gives the free, and $5 gives the percentage used.

By default it is set to update once daily, however you may want to change that to more often.

Command: df -hl | grep 'disk0s2' | awk '{print $4"/"$2" free ("$5" used)"}'
Font: Lucida Grande
Colour:White
Size: 14



Geeklet file(s) to download

freespace.glet

Either right-click and choose "Save Linked File As..." or hold the Option key and click to download files.
If using Safari, you may have to rename the files without the extra .txt extension that is added.