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

来源:互联网 发布:杨千嬅 长相 知乎 编辑:程序博客网 时间:2024/05/16 11:07

1. 查找bash路径

# which bash/usr/bin/bash
#!/usr/bin/bashi=1while [  $i -le 10 ]do i=$(($i+1))dd if=/dev/zero of=file$i.txt bs=2G count=1echo "file$i"donewhile true;dofind /testrm/ -size 2G | xargs -n 1 rm -rf   #/bin/sleep 1 find /testrm/ -size 2G | xargs -n 1 rm -rf  每秒钟执行一次done
阅读全文
0 0
原创粉丝点击