linux-tutorial/codes/shell/示例脚本/进阶脚本/查看磁盘使用百分比.sh

5 lines
99 B
Bash
Raw Normal View History

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