Unix/Linux Go Back    


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

How to get the df -h output in one line?

Linux


Tags
df, posix, solved

Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 02-25-2016
snchaudhari2 snchaudhari2 is offline
Registered User
 
Join Date: Aug 2010
Last Activity: 19 October 2016, 3:02 PM EDT
Posts: 137
Thanks: 28
Thanked 0 Times in 0 Posts
How to get the df -h output in one line?

HI Admin,

I would like to get the df -h output in one line in one of the RHEL server. How can I get it?

Quote:
bash-3.2$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d1p2 1.5G 772M 605M 57% /
/dev/mapper/optvg-fs_opt
1.5G 1.3G 133M 91% /opt
/dev/mapper/optvg-fs_xyz
124M 24M 95M 20% /opt/xyz
/dev/mapper/optvg-fs_home
9.7G 7.7G 1.6G 84% /home

Here the filesystem name is getting on 1 separate line, and other columns are in 1 line. How can I get all in 1 line? Any script?

Thanks is advance.

---------- Post updated at 01:17 PM ---------- Previous update was at 11:02 AM ----------

IN other words, how can I increase the space between column "filesystem" & "size" ?
Sponsored Links
    #2  
Old Unix and Linux 02-25-2016
MadeInGermany MadeInGermany is offline Forum Advisor  
Registered User
 
Join Date: May 2012
Last Activity: 24 May 2017, 10:21 PM EDT
Location: Simplicity
Posts: 3,547
Thanks: 277
Thanked 1,181 Times in 1,069 Posts
Try

Code:
df -hP

The Following User Says Thank You to MadeInGermany For This Useful Post:
snchaudhari2 (02-25-2016)
Sponsored Links
    #3  
Old Unix and Linux 02-25-2016
snchaudhari2 snchaudhari2 is offline
Registered User
 
Join Date: Aug 2010
Last Activity: 19 October 2016, 3:02 PM EDT
Posts: 137
Thanks: 28
Thanked 0 Times in 0 Posts
awesome!!! Thanks MadeInGermany!!!
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sed command to replace a line in a file using line number from the output of a pipe. vivek d r Shell Programming and Scripting 1 07-16-2014 11:29 AM
Joining multi-line output to a single line in a group gvk25 Shell Programming and Scripting 7 03-07-2012 05:22 AM
Bash - Loading a command's output line by line into an array Azrael Shell Programming and Scripting 4 09-20-2011 04:42 AM
Converting line output to column based output npatwardhan Shell Programming and Scripting 8 03-24-2010 09:40 AM
how to make a line BLINKING in output and also how to increase font size in output mail2sant Shell Programming and Scripting 3 04-14-2008 07:30 AM



All times are GMT -4. The time now is 01:15 AM.