Solaris 10 - How to find the total size of my hard disk? | Unix Linux Forums | Solaris

  Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Solaris 10 - How to find the total size of my hard disk?

Solaris


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 04-04-2009
saagar saagar is offline
Registered User
 
Join Date: Feb 2009
Last Activity: 8 May 2010, 10:25 AM EDT
Location: Trivandrum
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Tools Solaris 10 - How to find the total size of my hard disk?

Friends,
I have an 80 GB HDD, but I wish to know if there is a direct command in Solaris 10 to find out the size of my hard disk (similar to fdisk -l in Linux).
Thank you

saagar
Sponsored Links
    #2  
Old 04-04-2009
DukeNuke2's Avatar
DukeNuke2 DukeNuke2 is offline Forum Staff  
Soulman
 
Join Date: Jul 2006
Last Activity: 28 July 2014, 2:24 PM EDT
Location: Berlin, Germany
Posts: 5,371
Thanks: 54
Thanked 229 Times in 222 Posts
have a look at "iostat -E".
Sponsored Links
    #3  
Old 04-04-2009
jlliagre jlliagre is online now Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 28 July 2014, 6:01 PM EDT
Location: Paris
Posts: 4,397
Thanks: 15
Thanked 460 Times in 416 Posts
You can run "iostat -E" to get disk information. Otherwise, this shell script might help:

Code:
#!/bin/ksh
pfexec fdisk -G /dev/rdsk/c0d0p0 | tail -1 | nawk '{
ncyl=$2
nhead=$5
nsect=$6
secsz=$7
sectors=ncyl*nhead*nsect;
bytes=sectors/(1024/secsz);
printf("%7d MiB %7d MB\n", bytes/1024, bytes*1024/1000/1000);
}'

    #4  
Old 04-04-2009
saagar saagar is offline
Registered User
 
Join Date: Feb 2009
Last Activity: 8 May 2010, 10:25 AM EDT
Location: Trivandrum
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
DukeNuke2 and Jilliagre .. thanks so much for the quick replies. iostat -E is not working, it is shows info about my usb disk, but not hard disk... but the script worked perfect. Thanks a lot for you both...
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
unable to find a root hard disk DorrSmith SCO 1 07-16-2008 09:34 AM
Find total size for some files? helen008 UNIX for Dummies Questions & Answers 5 06-09-2008 12:01 PM
determine the physical size of the hard disk hoffies HP-UX 4 11-15-2007 04:08 AM
command to find out total size of a specific file size (spread over the server) abhinov Solaris 3 08-08-2007 06:48 AM
How to find the total size of a dirctory tree in Solaris 0ktalmagik Filesystems, Disks and Memory 1 05-06-2006 09:31 AM



All times are GMT -4. The time now is 06:30 PM.