I need to print _NFS_gold_002 ... 4.7T 2.5T 2.2T 53

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers I need to print _NFS_gold_002 ... 4.7T 2.5T 2.2T 53
# 1  
Old 11-08-2016
I need to print _NFS_gold_002 ... 4.7T 2.5T 2.2T 53

Code:
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
Code:
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


Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 11-08-2016 at 11:10 AM.. Reason: Added CODE tags.
# 2  
Old 11-08-2016
How about
Code:
df -h /dwhtpdev

# 3  
Old 11-08-2016
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 :
Code:
grep "dwhtpdev$" file

# 4  
Old 11-09-2016
Thanks for kind help but i am not able get data into table due alignment.
I want to print complete row like in


Code:
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

Code:
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


Moderator's Comments:
Mod Comment
Please wrap all code, files, input & output/errors in CODE tags.
It makes it far easier to read and preserves multiple spaces for indenting or fixed width data.

Last edited by rbatte1; 11-09-2016 at 06:59 AM.. Reason: Added CODE tags
# 5  
Old 11-09-2016
Try (untested)
Code:
df -h /dwhtpdev | awk 'NF==1 {getline TMP; $0 = $0 OFS TMP} 1'

# 6  
Old 11-09-2016
Thanks for the reply i am getting the output like this
Code:
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

Code:
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

Code:
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
Code:
FILENAME  
HARI

size
4.2

avail
2.2

like in a row
Code:
Filesystem            Size  Used Avail Use% Mounted on
10.160.5.27:/newday_nfs_gold_002/dwhtpdev                       4.7T  2.6T  2.1T  56% /dwhtpdev



Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 11-09-2016 at 08:08 AM.. Reason: Added CODE tags.
# 7  
Old 11-09-2016
Looks like you get what you specified in post#4.

And, I don't understand your requirements from what you post in #6.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Setting up Solaris 10 to print to a windows print server

Guys, I have a issue that I am trying to rectify please advise. lpstat -t shows scheduler is running printer lext644 disabled since Mon Dec 02 19:48:18 2013. available.I have restarted the printer service and it shows online but the above says disabled. I have a lot of jobs in the print... (1 Reply)
Discussion started by: terrywhitejr
1 Replies

2. UNIX for Dummies Questions & Answers

How to create a print filter that print text & image?

Currently, I have a print filter that takes a text file, that convert it into PCL which then gets to a HP printer. This works. Now I need to embedded a image file within the text file. I'm able to convert the image file into PCL and I can cat both files together to into a single document... (1 Reply)
Discussion started by: chedlee88-1
1 Replies

3. UNIX for Advanced & Expert Users

[Solved] remove all print jobs from a print queue

Hello, Sometimes i need to clear all the jobs of a print queue and it is really annoying to cancel one by one. Is there a way to cancel all print jobs for a specific print queue with a single command instead of cancelling them one by one? My AIX system is 5.3 Thank you for your attention (2 Replies)
Discussion started by: omonoiatis9
2 Replies

4. Shell Programming and Scripting

print first few lines, then apply regex on a specific column to print results.

abc.dat tty cpu tin tout us sy wt id 0 0 7 3 19 71 extended device statistics r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device 0.0 133.2 0.0 682.9 0.0 1.0 0.0 7.2 0 79 c1t0d0 0.2 180.4 0.1 5471.2 3.0 2.8 16.4 15.6 15 52 aaaaaa1-xx I want to skip first 5 line... (4 Replies)
Discussion started by: kchinnam
4 Replies

5. Shell Programming and Scripting

print lines AFTER lines cointaining a regexp (or print every first and fourth line)

Hi all, This should be very easy but I can't figure it out... I have a file that looks like this: @SRR057408.1 FW8Y5CK02R652T length=34 AGCAGTGGTATCAACGCAGAGTAAGCAGTGGTAT +SRR057408.1 FW8Y5CK02R652T length=34 FIIHFF6666?=:88@@@BBD:::?@ABBAAA>8 @SRR057408.2 FW8Y5CK02TBMHV length=52... (1 Reply)
Discussion started by: kmkocot
1 Replies

6. Shell Programming and Scripting

Howto Print File Path or Print the Filename

I'm trying to clean up my samba share and need to print the found file or print the path of the image it tried to searched for. So far I have this but can't seem to get the logic right. Can anyone help point me in the right direction? for FILE in `cat list`; do if ; then ... (1 Reply)
Discussion started by: overkill
1 Replies

7. Solaris

Print to ps2pdf print queue

I am trying to create a printer queue, on a SunOS 5.7 system, that outputs a pdf file. There is an application running on the system that has a print button, which sends print files to the default printer. If I disable the printer, I am able to manually capture the files in /var/spool/lp/tmp and... (2 Replies)
Discussion started by: Sean_69
2 Replies

8. UNIX for Dummies Questions & Answers

Print to a ps2pdf print queue.

I am trying to create a printer queue, on a SunOS 5.7 system, that outputs a pdf file. There is an application running on the system that has a print button, which sends print files to the default printer. If I disable the printer, I am able to manually capture the files in /var/spool/lp/tmp and... (1 Reply)
Discussion started by: Sean_69
1 Replies

9. HP-UX

Print Problem in UNIX. Need to know the option to specify the print paper size

Hi, Could any one please let me know what is the option available in UNIX to print by specifying the paper size? We are using Unix11i. I could n't see any option specified in the 'lp' command to print the report by specifying the size of the paper. It would be of great help to me, if... (1 Reply)
Discussion started by: ukarthik
1 Replies

10. Shell Programming and Scripting

How do I get awk to print a " in it's print part?

The line is simple, use " '{ print $1"]"$2"\"$3THE " NEEDS TO GO HERE$4 }' I've tried \", "\, ^" and '"" but none of it works. What am I missing? Putting in the [ between $1 and $2 works fine, I just need to do the same with a ". Thanks. (2 Replies)
Discussion started by: LordJezo
2 Replies
Login or Register to Ask a Question