<In Story>

raw device size 확인 스크립트 // [Unix] [Linux] [Script] [Programming] [Command] 본문

Programming/Script

raw device size 확인 스크립트 // [Unix] [Linux] [Script] [Programming] [Command]

<In Story, Hi story, History> 2015. 6. 6. 18:20

http://ktdsoss.tistory.com/174


#!/bin/sh

DISK=`cat /etc/sysconfig/rawdevices | grep -v \# | awk -F /dev/ '{print $3}'`

for i in $DISK

do

SIZE=`cat /proc/partitions | grep $i | awk '{print $3}'`

echo $i $(($SIZE/1024/1024)) GB

done

 

 

-- by 이찬호