I used Geektool extensively and one of my scripts does a "df -h", but excludes a few local volumes so it only shows the main HD and any mounted USB/firewire volumes. I just rolled up to the ML GM and I now when running a "df" I now see columns for "iused", "ifree" and "%iused". You used to have to specify the -i flag to see this. According to the man page, this is now default and the result is that the extra columns are skewing my Geektool layout. I want to exclude them. I know I can do so with awk or cut. However, doing so with either drops the formatting. Example:
stimpy:~ adavis$ df -h|grep -v devfs|grep -v "map"|grep -v "localhost"|grep -v "Boot OS X"|grep -v "Recovery HD"
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1 476Gi 195Gi 280Gi 42% 51312849 73422228 41% /
/dev/disk3s2 186Gi 8.8Mi 186Gi 1% 0 0 100% /Volumes/SHARED
/dev/disk3s1 410Gi 211Gi 199Gi 52% 55367029 52087612 52% /Volumes/PortableHFS
/dev/disk5 465Gi 134Gi 331Gi 29% 35208278 86726563 29% /Volumes/Time Machine (Work)
/dev/disk6s2 400Gi 201Gi 199Gi 51% 52687032 52086588 50% /Volumes/Documents (Encrypted)
stimpy:~ adavis$ df -h|grep -v devfs|grep -v "map"|grep -v "localhost"|grep -v "Boot OS X"|grep -v "Recovery HD"|awk '{print $1, $2, $3, $4, $5, $9}'
Filesystem Size Used Avail Capacity Mounted
/dev/disk1 476Gi 195Gi 280Gi 42% /
/dev/disk3s2 186Gi 8.8Mi 186Gi 1% /Volumes/SHARED
/dev/disk3s1 410Gi 211Gi 199Gi 52% /Volumes/PortableHFS
/dev/disk5 465Gi 134Gi 331Gi 29% /Volumes/Time
/dev/disk6s2 400Gi 201Gi 199Gi 51% /Volumes/Documents
and using cut has similar results...
Anyone have any clues as to how to strip the inode info off the output of "df" without dropping the formatting of df? I want the output and formatting and all columns except the three "i" columns of inode info.
stimpy:~ adavis$ df -h|grep -v devfs|grep -v "map"|grep -v "localhost"|grep -v "Boot OS X"|grep -v "Recovery HD"
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1 476Gi 195Gi 280Gi 42% 51312849 73422228 41% /
/dev/disk3s2 186Gi 8.8Mi 186Gi 1% 0 0 100% /Volumes/SHARED
/dev/disk3s1 410Gi 211Gi 199Gi 52% 55367029 52087612 52% /Volumes/PortableHFS
/dev/disk5 465Gi 134Gi 331Gi 29% 35208278 86726563 29% /Volumes/Time Machine (Work)
/dev/disk6s2 400Gi 201Gi 199Gi 51% 52687032 52086588 50% /Volumes/Documents (Encrypted)
stimpy:~ adavis$ df -h|grep -v devfs|grep -v "map"|grep -v "localhost"|grep -v "Boot OS X"|grep -v "Recovery HD"|awk '{print $1, $2, $3, $4, $5, $9}'
Filesystem Size Used Avail Capacity Mounted
/dev/disk1 476Gi 195Gi 280Gi 42% /
/dev/disk3s2 186Gi 8.8Mi 186Gi 1% /Volumes/SHARED
/dev/disk3s1 410Gi 211Gi 199Gi 52% /Volumes/PortableHFS
/dev/disk5 465Gi 134Gi 331Gi 29% /Volumes/Time
/dev/disk6s2 400Gi 201Gi 199Gi 51% /Volumes/Documents
and using cut has similar results...
Anyone have any clues as to how to strip the inode info off the output of "df" without dropping the formatting of df? I want the output and formatting and all columns except the three "i" columns of inode info.