shell:shell 创建多个指定大小的文件,循环删除指定大小文件

#!/usr/bin/bash
i=1
while [ $i -le 10 ]
do 
i=$(($i+1))
dd if=/dev/zero of=file$i.txt bs=2G count=1
echo "file$i"
done

while true;
do
find /testrm/ -size 2G | xargs -n 1 rm -rf 
#/bin/sleep 1 find /testrm/ -size 2G | xargs -n 1 rm -rf 每秒钟执行一次
done
每天努力一点,每天学习一点。 Keep Moving...
原文地址:https://www.cnblogs.com/channy14/p/11230444.html