How can I get hard disk drive size in Automator?

Posted on 2011-05-11
Last Modified: 2012-05-11
How can I get hard disk drive size in Automator?

Very simple i'm sure (may need to use shell script?) but i'm new to mac scripting and googling this topic seems to be a returning too many irrelevant results!
Question by:tickett
    LVL 11

    Accepted Solution

    df -H | grep 'disk0s2' | awk '{print $2}'

    Open in new window

    Seems to do the trick. Will close shortly unless anyone has any better alternatives?

    LVL 11

    Author Closing Comment

    Seems to do the trick!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    CocoaPods is the best way to manage library dependencies in iOS and OS X projects. By using cocoa pods there is no need of downloading the code from github and copying to your project. There are plenty of open source libraries now available with C…
    Windows 10 is here and for most admins this means frustration and challenges getting that first working Windows 10 image. As in my previous sysprep articles, I've put together a simple help guide to get you through this process. The aim is to achiev…
    This video discusses moving either the default database or any database to a new volume.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now