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

Tags
df, linux, 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?

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" ?
# 2  
Old 02-25-2016
Try
Code:
df -hP

This User Gave Thanks to MadeInGermany For This Post:
snchaudhari2 (02-25-2016)
# 3  
Old 02-25-2016
awesome!!! Thanks MadeInGermany!!!
Login to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Similar Threads 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 05:36 PM
Output to file print as single line, not separate line cogiz UNIX for Beginners Questions & Answers 7 11-16-2016 06: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 12:29 PM
convert single line output to multiple line kamauv234 Shell Programming and Scripting 6 08-07-2012 12:06 PM
Joining multi-line output to a single line in a group gvk25 Shell Programming and Scripting 7 03-07-2012 06:22 AM
Merge multi-line output into a single line flagman5 Shell Programming and Scripting 5 10-31-2011 03:15 PM
Bash - Loading a command's output line by line into an array Azrael Shell Programming and Scripting 4 09-20-2011 05:42 AM
Converting line output to column based output npatwardhan Shell Programming and Scripting 8 03-24-2010 10:40 AM
How to send output to web server, line by line? dihewidd Shell Programming and Scripting 3 02-22-2010 11:20 AM
Grep or other ways to output line above and/or below searched line sammac UNIX for Dummies Questions & Answers 2 07-24-2008 03:28 AM
single line input to multiple line output with sed mitch Shell Programming and Scripting 8 07-16-2008 02:57 PM
reading ps command's output line by line s. murat Shell Programming and Scripting 5 05-22-2008 05:23 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 08:30 AM
Making multi line output appear on one line djsal Shell Programming and Scripting 1 10-07-2004 07:21 PM
All times are GMT -4. The time now is 02:00 PM.

Unix & Linux Forums Content Copyright 1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password





Not a Forum Member?
Forgot Password?