运维网's Archiver
论坛
›
Shell/Powershell
› shell脚本11
szs
发表于 2018-8-26 07:24:05
shell脚本11
计算/etc目录中所有"*.conf"形式的配置文件所占用的总空间的大小
具体实现:
#!/bin/bash
sizenums=$(ls -l $(find /etc -type f -a -name *.conf) |awk '{print $5}')
total=0
for i in $sizenums
do
total=`expr $total + $i`
done
echo "total>
页:
[1]
查看完整版本:
shell脚本11