df -m | sed -n 2p | awk '{ print $4 }'  

that will show you how much space you have left on the root partition in most 
cases if your /boot isn't mounted.

Basically sed prints the second line while awk gets the forth bit of 
information printed which is your free disk space.


On Friday 30 January 2004 17:56, Paul Stear wrote:
> Hi again,
> Can anybody help with my backup script?  I need to calculate the free space
> on a disc.
> I can get the disc size so all I need is to calculate the used size and
> then subtract.
> Or is there an easier way?
>
> thanks
> Paul

--
[EMAIL PROTECTED] mailing list

Reply via email to