Home Man
Today's Posts

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

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

df, posix, solved

👤 Login to reply

Thread Tools Search this Thread
# 1  
Old 02-25-2016
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?

bash-3.2$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d1p2 1.5G 772M 605M 57% /
1.5G 1.3G 133M 91% /opt
124M 24M 95M 20% /opt/xyz
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" ?
# 2  
Old 02-25-2016
df -hP

The Following User Says Thank You to MadeInGermany For This Useful Post:
snchaudhari2 (02-25-2016)
# 3  
Old 02-25-2016
awesome!!! Thanks MadeInGermany!!!
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to read the output of a command line by line and pass it as a variable? Samah Shell Programming and Scripting 10 09-27-2017 04:36 PM
Output to file print as single line, not separate line cogiz UNIX for Beginners Questions & Answers 7 11-16-2016 05:09 PM
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
Grep or other ways to output line above and/or below searched line sammac UNIX for Dummies Questions & Answers 2 07-24-2008 02:28 AM
single line input to multiple line output with sed mitch Shell Programming and Scripting 8 07-16-2008 01:57 PM
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 02:19 AM.

All times are GMT -4. The time now is 02:19 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
Show Password