The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-04-2008
shew01 shew01 is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 41
Can df output be forced to a single line for each file system?

df generates the following output on one of our systems:

Code:
df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/vx/dsk/rootvol    4131866   3593316    497232  88% /
swap                  19963152       144  19963008   1% /var/run
swap                  19985184     22176  19963008   1% /tmp
/dev/vx/dsk/u01      112302757  30834420  80345310  28% /u01
/dev/vx/dsk/node@1       96975      4977     82301   6% /global/.devices/node@1
/dev/vx/dsk/node@2       96975      4988     82290   6% /global/.devices/node@2
/dev/vx/dsk/stkdg/s03
                     1047527424  60483821 925353439   7% /s03
/dev/vx/dsk/stkdg/s02
                     1048576000 266825846 732890795  27% /s02
/dev/vx/dsk/sandg/s01
                     355923968 322686891  31315266  92% /global/s01

Is there a way to force the output to display each Filesystem on a single line instead of splitting the lines after the first column? For example, I am trying to get the output to look like this:

Code:
df -k
Filesystem             1K-blocks      Used Available Use% Mounted on
/dev/vx/dsk/rootvol      4131866   3593316    497232  88% /
swap                    19963152       144  19963008   1% /var/run
swap                    19985184     22176  19963008   1% /tmp
/dev/vx/dsk/u01        112302757  30834420  80345310  28% /u01
/dev/vx/dsk/node@1         96975      4977     82301   6% /global/.devices/node@1
/dev/vx/dsk/node@2         96975      4988     82290   6% /global/.devices/node@2
/dev/vx/dsk/stkdg/s03 1047527424  60483821 925353439   7% /s03
/dev/vx/dsk/stkdg/s02 1048576000 266825846 732890795  27% /s02
/dev/vx/dsk/sandg/s01  355923968 322686891  31315266  92% /global/s01