This is a simple way to display the df info on a Linux system. It calculates free space in a human readable format
\#!/bin/bash
\#
df -Tx tmpfs -x devtmpfs | grep / | sort -rnk 1 |awk '{ printf " %-10s %-15s %7.3f %7.3f %7.3f \n", $1, $7, (($5/1024)/1024),(($3/1024)/1024),(($5/$3)*100) } ';
No comments:
Post a Comment