linux 中利用while死循环输出指定目录的大小

 

001、

[root@PC1 test2]# cat record.sh
#!/bin/bash

while :
do
        du -sh ./
        sleep 2                      ## 每隔2秒输出指定目录的大小
done

 

posted @ 2023-06-15 00:38  小鲨鱼2018  阅读(13)  评论(0编辑  收藏  举报