×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

script strategy to list disks and partitions

script strategy to list disks and partitions

script strategy to list disks and partitions

(OP)
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.

RE: script strategy to list disks and partitions

df -k

Blue Dragon

If I wasn't Blue, I would just be a Dragon...

RE: script strategy to list disks and partitions

Maybe: man prtvtoc

 

RE: script strategy to list disks and partitions

Or, depending on what you're trying to report, "man devinfo".

 

RE: script strategy to list disks and partitions

(OP)
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.

RE: script strategy to list disks and partitions

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
tgmlify - code syntax highlighting for your tek-tips posts

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close