无聊随手刻一个
#!/bin/bash
PBAR_W=50;
TMP_PATH='/tmp'
progress_bar(){
FILL=$[$PBAR_W*$USED/100]
printf "USED:[%${FILL}s"|tr ' ' '#'|tr -d '\n'
printf "%$[$PBAR_W - $FILL]s"|tr ' ' '.'|tr -d '\n'
echo "] ${USED}%"
}
while((1));do
USED=`df -h|grep " ${TMP_PATH}"|awk '{print $5}'|tr -d '%'`
progress_bar
sleep 1
done