Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script strategy to list disks and partitions

Status
Not open for further replies.

goBoating

Programmer
Feb 8, 2000
1,606
0
0
US
Hello All,

Tried the search for this to no avail.

I am writing a Perl application that must report disks and partitions on Solaris 8, 9, and 10. I am familiar with the 'format' command and it provides all the info I need. However, it expects someone to interact with it to move through the menus.

The same application runs on Linux, also, and there, I can easily use 'fdisk -l' to get exactly what I need (list of disks and partitions there on).

Is there a more direct route to this info than via 'format?'

I hate having to maneuver through the format command just to get a reporting of disks/partitions when an incorrect move can trash the machine. There must be a safer approach.

TIA.

'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
df -k

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Or, depending on what you're trying to report, "[tt]man devinfo[/tt]".

 
A combination of those gets me where I need to go.

Thanks a ton.

'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
I know you're already well on the way, but I recall using format </dev/null regularly to get the list of probed disk devices.

Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top