1、检查磁盘分区:
[root@oldboyedu59 ~]# fdisk -l
Disk /dev/sda: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000d00de
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 411647 204800 83 Linux
/dev/sda2 411648 2508799 1048576 82 Linux swap / Solaris
/dev/sda3 2508800 209715199 103603200 83 Linux
2、raid级别:
3、awk方法
方便 默认就支持小数
[root@oldboyedu59 ~]# # + - * / ^ **
[root@oldboyedu59 ~]# awk 'BEGIN{print 10^3}'
1000
[root@oldboyedu59 ~]# awk 'BEGIN{print 10**3}'
1000
bc 方法 basic calc
默认不支持小数
-l(小写字母L) 显示小数
[root@oldboyedu59 ~]# echo 10/3|bc -l
3.33333333333333333333
[root@oldboyedu59 ~]# echo "scale=5;1/3"|bc
.33333