1753727 Members
4831 Online
108799 Solutions
New Discussion юеВ

output of bdf

 
SOLVED
Go to solution
nightwish
Advisor

output of bdf

Hi ..

I want to put the output of the command bdf, all like the begining of the snapshot..

/dev/vg00/lvol5 2150400 225325 1806726 11% /savecrash
/dev/vgwsx/lvol1 10485760 6840846 3531194 66% /oradata/MP_WSX
/dev/vg00/lvol6 819200 507640 292147 63% /opt
/dev/vg00/lvoltib 102400 34019 64164 35% /opt/tib
/dev/vg00/lvol9 1048576 822505 214508 79% /opt/oracle
/dev/vgws_mpbe/lvol9 53248 4675 45599 9% /oradata/WSMPBE0
/dev/vgws_mpbe/lvol2
512000 369879 133245 74% /oradata/WSMPBE1
/dev/vgws_mpbe/lvol3
3072000 2409453 621272 80% /oradata/WSMPBE2

This is a bug of bdf ?? I don't understand why the end is different from the begining !! .. I need all text frmated as the begining to produce a documment
12 REPLIES 12
James R. Ferguson
Acclaimed Contributor

Re: output of bdf

Hi:

This is not a bug. Your output lines are long enough to span multiple lines. Use Bill Hassell's script as recently updated and posted here:

https://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1048509

Regards!

...JRF...
Rick Garland
Honored Contributor

Re: output of bdf

There is also a GNU version of bdf available with options for human readable format.

Similar to the Linux version of df where you can the -h option and the output will be condensed and report M or G.

You may also want to look at the 'gdf' tool as well.
spex
Honored Contributor

Re: output of bdf

Hello,

Also consider:

1) Redirecting 'bdf' output to a file, and then using that file to produce your document
# bdf > /tmp/bdf.out

2) Using 'cut' to trim on-screen 'bdf' output (with loss of data)
# bdf | cut -c-${COLUMNS}

PCS
Sandman!
Honored Contributor
Solution

Re: output of bdf

Refer to Bill Hassell's script for displaying wrapped lines on a single one.

https://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1048509

or pipe the output to awk for something like:

# bdf | awk '{if(NF==1){l=$0;getline;sub(" *"," ");print l$0}else print}'
Bill Hassell
Honored Contributor

Re: output of bdf

bdf always breaks up the line when the source lvol (like /dev/vgws_mpbe/lvol2 in your case) is too long. This is very common with NFS mountpoints but a pain for nice looking formats and scripting. The attached script will show the bdf output as megabytes (plus other options)


Bill Hassell, sysadmin
Bill Hassell
Honored Contributor

Re: output of bdf

bdf always breaks up the line when the source lvol (like /dev/vgws_mpbe/lvol2 in your case) is too long. This is very common with NFS mountpoints but a pain for nice looking formats and scripting. The attached script will show the bdf output as megabytes (plus other options)


Bill Hassell, sysadmin
rariasn
Honored Contributor

Re: output of bdf

Reply:
Use Bill Hassell "bdf" utility to format otuput:

https://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1048509

"one line for each file system"

rgs,

ran
Torsten.
Acclaimed Contributor

Re: output of bdf

@rariasn:

Why don't you refer to this thread?
Please have a look at the post above yours.

First read, then post (or skip it).

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
rariasn
Honored Contributor

Re: output of bdf

Excuse me Sir Torsten, not wise that you are the moderator of this forum.

rgs,

ran