当前位置:网站首页>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
边栏推荐
- 【2021年新书推荐】Professional Azure SQL Managed Database Administration
- adb shell 常用命令
- Itop4412 HDMI display (4.0.3_r1)
- error 403 In most cases, you or one of your dependencies are requesting解决
- adb shell常用模拟按键keycode
- MySQL notes 5_ Operation data
- org. xml. sax. SAXParseException; lineNumber: 141; columnNumber: 252; cvc-complex-type. 2.4. a: Found element 'B
- Itop4412 surfaceflinger (4.4.4_r1)
- Viewpager2 realizes Gallery effect. After notifydatasetchanged, pagetransformer displays abnormal interface deformation
- oracle通过触发器和序列来定义自增主键,并且设置定时任务每秒钟插入一条数据到目标表
猜你喜欢

【2021年新书推荐】Learn WinUI 3.0

Android清除应用缓存

Record WebView shows another empty pit

Component learning (2) arouter principle learning

Itop4412 LCD backlight drive (PWM)

Android面试计网面经大全【持续更新中。。。】

组件化学习(2)Arouter原理学习

oracle通过触发器和序列来定义自增主键,并且设置定时任务每秒钟插入一条数据到目标表

实习做了啥
![[2021 book recommendation] red hat rhcsa 8 cert Guide: ex200](/img/5a/387baa0f59e5a8a502bb157184d968.png)
[2021 book recommendation] red hat rhcsa 8 cert Guide: ex200
随机推荐
sys.dbms_scheduler.create_job创建定时任务(功能更强大丰富)
oracle计算两日期相差多少秒,分钟,小时,天
Miscellaneous learning
Android room database quick start
窗口分析函数LAST_VALUE,FIRST_VALUE,lag,lead
oracle通过触发器和序列来定义自增主键,并且设置定时任务每秒钟插入一条数据到目标表
Cause: dx.jar is missing
Viewpager2 realizes Gallery effect. After notifydatasetchanged, pagetransformer displays abnormal interface deformation
BottomSheetDialogFragment 与 ListView RecyclerView ScrollView 滑动冲突问题
oracle给对象重命名
中国各省会城市经纬度位置
[2021 book recommendation] red hat rhcsa 8 cert Guide: ex200
MarkDown基础语法笔记
[Exynos4412][iTOP4412][Android-K]添加产品选项
双指针仪表盘读数(一)
Itop4412 LCD backlight drive (PWM)
读书小记——Activity
【2021年新书推荐】Artificial Intelligence for IoT Cookbook
BottomSheetDialogFragment + ViewPager+Fragment+RecyclerView 滑动问题
oracle中生成32位uuid