bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: df improvements


From: Philip Rowlands
Subject: Re: df improvements
Date: Mon, 6 Nov 2006 18:27:56 +0000 (GMT)

[ dropping address@hidden due to bounced mail ]

On Mon, 6 Nov 2006, Roberto Piola wrote:

Philip Rowlands wrote:

 On Mon, 6 Nov 2006, Roberto Piola wrote:

>  I was trying to use df in scripts.
> > Since LVM introduces very long device names, the column with usage% was > floating, so, I modified a little the df utility, by adding the -q > switch, that forces a very small output, without header and with just two > columns (usage % and mount point).


 Does the --portabililty option not do what you need?


 Cheers,
 Phil

I experimented a little with it, but I failed to find a format suitable for my needs... what I needed was something simple to slice with cut, and even with -P I got

address@hidden ~]# df -P
Filesystem         1024-blocks      Used Available Capacity Mounted on
/dev/mapper/VolGroup00-LogVol00  67763800  43385020  20936504      68% /
/dev/sda1               101086     26555     69312      28% /boot

while with -q I get:

68% /
28% /boot

OK - you didn't mention -P, which is the solution to the line-folding issue. For picking out specific fields, I'd be tempted to use cut or awk rather than introduce a new option.


Cheers,
Phil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]