监视CPU、IO、内存等的日志记录:
#bin/sh # for Monitoring system vmstat 1 1 | (while read -r line; do echo "$(date): $line"; done) >> /etc/vmstat.log
统计子目录下的文件个数:
do if test -d ${dirlist};then echo -n ${dirlist}: && ls -1f ${dirlist}|wc -l fi done
监视CPU、IO、内存等的日志记录:
#bin/sh # for Monitoring system vmstat 1 1 | (while read -r line; do echo "$(date): $line"; done) >> /etc/vmstat.log
统计子目录下的文件个数:
do if test -d ${dirlist};then echo -n ${dirlist}: && ls -1f ${dirlist}|wc -l fi done