shell:shell 创建多个指定大小的文件,循环删除指定大小文件
发布时间:2020-12-16 01:55:43 所属栏目:安全 来源:网络整理
导读:? ? # !/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;dofind /testrm/ -size 2G | xargs -n 1 rm - rf # /bin/sleep 1 find /testrm/ -size 2G | xargs -n 1 rm -r
? ? #!/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 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |