hkatari
1
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg00-root_vol
3.9G 549M 3.1G 15% /
tmpfs 7.8G 12K 7.8G 1% /dev/shm
/dev/sda1 190M 63M 118M 35% /boot
/dev/mapper/vg00-home_vol
3.9G 1.8G 2.0G 48% /home
/dev/mapper/vg00-tmp_vol
3.9G 115M 3.6G 4% /tmp
/dev/mapper/vg00-usr_vol
3.9G 2.8G 923M 76% /usr
/dev/mapper/vg00-var_vol
3.9G 1.3G 2.4G 34% /var
/dev/mapper/vg01-u01_vol
9.8G 3.6G 6.3G 37% /u01
/dev/mapper/vg01-svn_vol
99G 60M 99G 1% /svn
/dev/mapper/vg01-devt_vol
9.8G 23M 9.7G 1% /devt
/dev/mapper/vg01-sit_vol
20G 44M 20G 1% /sit
/dev/mapper/vg01-powermart_vol
79G 32G 48G 40% /powermart
10.160.5.27:/newday_nfs_gold_002/dwhtpdev
4.7T 2.5T 2.2T 53% /dwhtpdev
acxdlapv03.uk.acxiom.com:/mnt/aws_gw_newday_poc_volume1
1008G 683G 275G 72% /ltds
How can i print the row
10.160.5.27:/newday_nfs_gold_002/dwhtpdev
4.7T 2.5T 2.2T 53% /dwhtpdev
from the file
from the above df -h
command.
Thanks in advance
RudiC solution is correct way of getting what you asked for from (mounted) drives.
If you want to extract the data from file , below one will help :
grep "dwhtpdev$" file
Thanks for kind help but i am not able get data into table due alignment.
I want to print complete row like in
Filesystem Size Used Avail Use% Mou
10.160.5.27:/newday_nfs_gold_002/dwhtpdev 4.7T 2.5T 2.2T 53% /dwhtpdev
but the line look like below
Filesystem Size Used Avail Use% Mounted on
10.160.5.27:/newday_nfs_gold_002/dwhtpdev
4.7T 2.5T 2.2T 53% /dwhtpdev
Could pls help in these
Thanks in advance
RudiC
5
Try (untested)
df -h /dwhtpdev | awk 'NF==1 {getline TMP; $0 = $0 OFS TMP} 1'
Thanks for the reply i am getting the output like this
Filesystem Size Used Avail Use% Mounted on
10.160.5.27:/newday_nfs_gold_002/dwhtpdev 4.7T 2.6T 2.1T 56% /dwhtpdev
But i need the out like
Filesystem Size Used Avail
10.160.5.27:/newday_nfs_gold_002/dwhtpdev 4.7T 2.6T 2.1T
Use% Mounted on
56% /dwhtpdev
Could pls help me getting the alignment like above
Thanks in advance
---------- Post updated at 06:52 AM ---------- Previous update was at 06:47 AM ----------
i need output like columns wise
Filesystem Size.......
10.160.5.27:/newday_nfs_gold_002/dwhtpdev 4.7T......
---------- Post updated at 06:58 AM ---------- Previous update was at 06:52 AM ----------
i am not able to keep aligment in the msg . I need the to print the row like column to column like
FILENAME
HARI
size
4.2
avail
2.2
like in a row
Filesystem Size Used Avail Use% Mounted on
10.160.5.27:/newday_nfs_gold_002/dwhtpdev 4.7T 2.6T 2.1T 56% /dwhtpdev
RudiC
7
Looks like you get what you specified in post#4.
And, I don't understand your requirements from what you post in #6.
Hi Rudi,
Thanks for your kind help
As i am trying import the file in informtica i need to import the file by column wise
like
FILESYSTEM
10.160.5.27:/newday_nfs_gold_002/dwhtpdev
SIZE
4.4T
USED
2.2T
etc in a row
FILENAME................................................ SIZE
10.160.5.27:/newday_nfs_gold_002/dwhtpdev 4.4t
ok
But the below
Filesystem Size Used Avail Use% Mounted on
10.160.5.27:/newday_nfs_gold_002/dwhtpdev
4.7T 2.5T 2.2T 53% /dwhtpdev
I am not get aligment by column wise . In file system column 10.160.5.27:/newday_nfs_gold_002/dwhtpdev
comes under the size and used, avail.
I hope u will got it now
Thanks
---------- Post updated at 09:07 AM ---------- Previous update was at 07:39 AM ----------
Hi Rudi,
[hkatar@newdlapv01 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg00-root_vol
3.9G 549M 3.1G 15% /
tmpfs 7.8G 12K 7.8G 1% /dev/shm
/dev/sda1 190M 63M 118M 35% /boot
/dev/mapper/vg00-home_vol
3.9G 1.8G 2.0G 48% /home
/dev/mapper/vg00-tmp_vol
3.9G 115M 3.6G 4% /tmp
/dev/mapper/vg00-usr_vol
3.9G 2.8G 923M 76% /usr
/dev/mapper/vg00-var_vol
3.9G 1.3G 2.4G 35% /var
/dev/mapper/vg01-u01_vol
9.8G 3.6G 6.3G 37% /u01
/dev/mapper/vg01-svn_vol
99G 60M 99G 1% /svn
/dev/mapper/vg01-devt_vol
9.8G 23M 9.7G 1% /devt
/dev/mapper/vg01-sit_vol
20G 44M 20G 1% /sit
/dev/mapper/vg01-powermart_vol
79G 32G 48G 40% /powermart
10.160.5.27:/newday_nfs_gold_002/dwhtpdev
4.7T 2.5T 2.2T 53% /dwhtpdev
acxdlapv03.uk.acxiom.com:/mnt/aws_gw_newday_poc_volume1
1008G 683G 275G 72% /ltds
I am using df -h find the diskspace on directory
I need to print only the row for the above df -h command could u please help in these.
Size Used Avail Use% Mounted on
4.7T 2.5T 2.2T 53% /dwhtpdev