当前位置:网站首页>Thanos.sh灭霸脚本,轻松随机删除系统一半的文件
Thanos.sh灭霸脚本,轻松随机删除系统一半的文件
2022-04-23 06:09:00 【dotphoenix】
#!/bin/sh
let "i=`find . -type f | wc -l`/2";
if [[ uname=="Darwin" ]]; then
find / -not -name "Thanos.sh" -type f -print0 | gshuf -z -n $i | xargs -0 -- ls -al;
else
find / -not -name "Thanos.sh" -type f -print0 | shuf -z -n $i | xargs -0 -- ls -al;
fi
# Explaination
## Step 1: Get the count of files in current path divided by two.
## Step 2: Get all the files in current path and print in one line.
## Step 3: Turn half of the second step output into standard input randomly.
## Step 4: Show half of the files in terminal.
# Key Point 关键在这里
## If you want to make delete, what you need to do is turn 'ls -al' into 'rm'.
## 如果想要真的delete,只需要把'ls -al' 转换为 'rm'.
版权声明
本文为[dotphoenix]所创,转载请带上原文链接,感谢
https://blog.csdn.net/dotphoenix/article/details/94716192
边栏推荐
- Itop4412 kernel restarts repeatedly
- Cause: dx. jar is missing
- Oracle Job定时任务的使用详解
- iTOP4412 FramebufferNativeWindow(4.0.3_r1)
- iTOP4412 HDMI显示(4.0.3_r1)
- 【2021年新书推荐】Practical IoT Hacking
- 双指针仪表盘读数(一)
- oracle用delete删除数据所需时间测试
- 【2021年新书推荐】Professional Azure SQL Managed Database Administration
- error 403 In most cases, you or one of your dependencies are requesting解决
猜你喜欢
组件化学习(1)思想及实现方式
Fill the network gap
Component based learning (3) path and group annotations in arouter
iTOP4412 HDMI显示(4.0.3_r1)
this.getOptions is not a function
Android面试计网面经大全【持续更新中。。。】
组件化学习(2)Arouter原理学习
BottomSheetDialogFragment 与 ListView RecyclerView ScrollView 滑动冲突问题
Itop4412 HDMI display (4.4.4_r1)
Component based learning (1) idea and Implementation
随机推荐
oracle存储过程中is和as区别
oracle生成毫秒级时间戳
Abnormal record-11
AVD Pixel_ 2_ API_ 24 is already running. If that is not the case, delete the files at C:\Users\admi
【2021年新书推荐】Red Hat Certified Engineer (RHCE) Study Guide
Viewpager2 realizes Gallery effect. After notifydatasetchanged, pagetransformer displays abnormal interface deformation
oracle创建表空间和修改用户默认表空间
iTOP4412 FramebufferNativeWindow(4.0.3_r1)
取消远程依赖,用本地依赖
JS 比较2个数组中不同的元素
sys.dbms_scheduler.create_job创建定时任务(功能更强大丰富)
Explore how @ modelandview can forward data and pages through the source code
AVD Pixel_2_API_24 is already running.If that is not the case, delete the files at C:\Users\admi
Binder mechanism principle
Encapsulate a set of project network request framework from 0
oracle对表字段的修改
组件化学习(3)ARouter中的Path和Group注解
npm ERR code 500解决
Handler进阶之sendMessage原理探索
Using stack to realize queue out and in