Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- portable
- script
- Crack(Serial Key)
- Disk Partition
- Windows 10
- LiveCD(USB)
- apm
- MS windows
- Backup(Restore)
- webhard
- Network Info(Tool)
- PC
- javascript
- H/W
- UNIX
- 대항해시대
- explorer
- Command
- Update
- Programming
- game
- Linux
- SSH
- program
- OS(operating system)
- network
- MS Windows PE
- FTP
- calculator
- web
Archives
- Today
- Total
<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:20http://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 이찬호