shell/shell脚本编程进阶/查看磁盘使用百分比.sh

5 lines
99 B
Bash
Raw Normal View History

2016-05-23 08:32:00 +08:00
#!/bin/bash
#查看磁盘实用百分比
df -h /dev/sda1 | sed -n '/% \//p' | gawk '{ print $5 }'