On Wed, Jan 30, 2013 at 2:18 PM, Andrew Freiberger
<[email protected]> wrote:
> tune2fs ${part_slash} |grep -i block
>
> will give you lots of good info w/out the fsck.

Agreed, tune2fs gives lots of good information.  For the number of used blocks:

maxblocks=$(tune2fs -l /dev/sda1 | grep '^Block count' | cut -d: -f2)
freeblocks=$(tune2fs -l /dev/sda1 | grep '^Free blocks' | cut -d: -f2)
echo $(($maxblocks-$freeblocks))

It's definitely more verbose than the one-liner, although I'm not sure
that it's any more readable.

Sure would be nice if tune2fs output its data in some structured
format, e.g. JSON.

Regards,
- Robert

-- 
-- 
Central West End Linux Users Group (via Google Groups)
Main page: http://www.cwelug.org
To post: [email protected]
To subscribe: [email protected]
To unsubscribe: [email protected]
More options: http://groups.google.com/group/cwelug
--- 
You received this message because you are subscribed to the Google Groups 
"Central West End Linux Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to