标签:dircectory
#!/bin/bash # 读取一个目录 read -p "Please input check directory.." Dirc dir=`ls $Dirc` for i in $dir do # 如果这个目录是否是根目录 if [ $Dirc = ‘/‘ ]; then if [[ $i = "mnt" || $i = "lost+found" || $i = "proc" ]] ; then continue else du -sh /$i fi else if [[ $i = "lost+found" ]]; then continue else du -sh $Dirc/$i fi fi done
标签:dircectory
原文地址:http://ting2junshui.blog.51cto.com/975290/1740921