Changeset 1857 in MondoRescue for branches/2.2.5/mindi/aux-tools
- Timestamp:
- Jan 11, 2008, 3:28:40 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.5/mindi/aux-tools/sbin/calc-disk-size
r911 r1857 6 6 CalcDiskSize() { 7 7 local res cylinders sectorsize disksize i curr stub out 8 res=`parted2fdisk -l $1 2> 8 res=`parted2fdisk -l $1 2>/dev/null | grep -i "cylinders of"` 9 9 cylinders=`echo "$res" | cut -d' ' -f5` 10 10 sectorsize=`echo "$res" | cut -d' ' -f7` 11 cylindermod=`parted2fdisk -l $1 2> 11 cylindermod=`parted2fdisk -l $1 2>/dev/null | grep -i $1:`; # note colon at end to make sure it's not the /dev/sda# partition info 12 12 cylnum=`echo "$cylindermod" | cut -d' ' -f7` 13 13 predisksize=$(($cylinders*$sectorsize/1024))
Note:
See TracChangeset
for help on using the changeset viewer.