Operating System - Linux
1751685 Members
4967 Online
108781 Solutions
New Discussion юеВ

Re: Output of "df" command in single line for each disks in linux

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

Output of "df" command in single line for each disks in linux

Hi All,

I am using Redhat and Suse linuxs.

The df command is showing details in single line for some disks and double lines for some disks.

I want details in single line for all disks.

Pls refer the attachment.
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: Output of "df" command in single line for each disks in linux

Shalom,

df is for file systems.

vgdisplay will show overall statistics for an entire volume group.

vgdisplay -v

Also for physical volumes

pvdisplay and pvdisplay -v

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jeff_Traigle
Honored Contributor
Solution

Re: Output of "df" command in single line for each disks in linux

"df -P" for straight POSIX format or "df -Ph" for human-readable format. See "man df". (I only have SLES, but I'm guessing it's the same on RH.)
--
Jeff Traigle
senthil_kumar_1
Super Advisor

Re: Output of "df" command in single line for each disks in linux

Hi Jeff,

Thanks a lot !!!


It is working fine.
senthil_kumar_1
Super Advisor

Re: Output of "df" command in single line for each disks in linux

Like the above command "df -Ph", what is the command used for HP Unix.
Steven E. Protter
Exalted Contributor

Re: Output of "df" command in single line for each disks in linux

Shalom again,

I use df -kh

That is the most like HP-UX bdf.

I put this in .bashrc of my Linux machines.

alias bdf='df -kh'


SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
John Poff
Honored Contributor

Re: Output of "df" command in single line for each disks in linux

The 'df -P' works in HP-UX, but it still lists the logical volume on a separate line from the rest of the information (at least it does on one of my boxes).

Hey SEP,

Isn't '-h' for human readable format and '-k' for 1K blocks? It looks like those would be exclusive of each other. When I do a 'df -kh' on my Linux, the output is the same as a 'df -k', and a 'df -hk' is the same as 'df -h'.

It looks like it takes which one comes first and ignores the second one.

JP
Sivakumar MJ._1
Respected Contributor

Re: Output of "df" command in single line for each disks in linux

Senthil, Check the link..

http://ss64.com/bash/df.html
prisca3
Occasional Advisor

Re: Output of "df" command in single line for each disks in linux

try 'bdf' command