블로그 이미지
OSSW(Open Source System SoftWare

calendar

      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

Notice

2014. 5. 26. 10:48 3. OS이야기/03. Shell Script

#!/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 이찬호

posted by DB,MW,OS OSSW(Open Source System SoftWare

댓글을 달아 주세요