Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Unix Total Hard Disk Capacity
Name: Parimal Date: October 1, 2002 at 07:15:10 Pacific OS: All Unix Flavors CPU/Ram: All
Comment:
I need a command or a script which can give following information for all unix flavors 1)Total Hard Disk Capacity, it should include all hard disk installed 2) Free Space of Hard Disks 3) Used Space of Hard Disks
Name: jimbo Date: October 1, 2002 at 07:27:44 Pacific
Reply:
>Total Hard Disk Capacity, it should include >all hard disk installed
(Assuming you meant hard disks mounted by the system) You can have a drive installed, but the system won't know options #2 & #3.
Your best solution is to pipe a df -k command through awk and have it total up the relevant columns for you. -jim
0
Response Number 2
Name: Parimal Date: October 1, 2002 at 07:31:02 Pacific
Reply:
Yeh Jim, Thanks for the input. I mean all physical disk drives. How about this command, can you verify this ?
1) Below Command will give you Total Hard Disk Capacity in MB df -k|sed 1d|awk '{total += $2} \ END {print total/1000}'
Below Command will give you Available Space(Free Space) in MB 2) df -k | sed 1d | awk '{total += $4} \ END {print total/1000}' -P
0
Response Number 3
Name: jimbo Date: October 1, 2002 at 07:41:38 Pacific
Reply:
Yeah, that's basically what i mean. Sorry i can't test at the moment. i'm on a win98 with cygwin and the df command output is different. You can make those into one command by making the variable names (total, avail, used) different for each column. Check this script for what i mean:
Summary: could you just guide me how to install 2nd hard-disk and mount the file system on to sco-unix 5.0.5. please give the step-by-step procedure. regards sarita ...
Summary: I woukd like to create a buckup disk, using dd. I just bought a new hard disk (IDE), biggest that the original one. I apreciate if anyone can send me a simple procedure to make the backup. I has to lo...
Summary: How to find CPU Usage , RAM, Hard Disk space. This should be on " DEC OSF/1 " I need to write these details into log file for every 10 min. sar command doesn't work on DEC OSF/1(Digital UNIX) ...