#!/usr/bin/env bash
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
read -p "请输入目录名称(例如:/root)" result
cd ${result}
for k in $(ls ${result})
do
[ -d $k ] && du -sh $k
done
#!/usr/bin/env bash
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
read -p "请输入目录名称(例如:/root)" result
cd ${result}
for k in $(ls ${result})
do
[ -d $k ] && du -sh $k
done