shell 遍历目录下的所有文件
dir=/usr/local/nginx/logs for file in $dir/*; do echo $file done
//结果 ./test.sh /usr/local/nginx/logs/access1.log /usr/local/nginx/logs/access.log /usr/local/nginx/logs/error.log /usr/local/nginx/logs/host.access.log /usr/local/nginx/logs/logs /usr/local/nginx/logs/nginx.pid