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

5 lines
99 B
Bash

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