当前位置:网站首页>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年新书推荐】Red Hat RHCSA 8 Cert Guide: EX200
adb shell top 命令详解
个人博客网站搭建
ffmpeg常用命令
【2021年新书推荐】Artificial Intelligence for IoT Cookbook
oracle通过触发器和序列来定义自增主键,并且设置定时任务每秒钟插入一条数据到目标表
iTOP4412 HDMI显示(4.0.3_r1)
JVM basics you should know
C#新大陆物联网云平台的连接(简易理解版)
【2021年新书推荐】Enterprise Application Development with C# 9 and .NET 5
随机推荐
oracle表的约束详解
记录webView显示空白的又一坑
iTOP4412 FramebufferNativeWindow(4.0.3_r1)
利用栈实现队列的出队入队
Itop4412 kernel restarts repeatedly
iTOP4412 SurfaceFlinger(4.0.3_r1)
oracle分区的相关操作
BottomSheetDialogFragment + ViewPager+Fragment+RecyclerView 滑动问题
MarkDown基础语法笔记
Fill the network gap
项目,怎么打包
ProcessBuilder工具类
Android面试计网面经大全【持续更新中。。。】
中国各省会城市经纬度位置
oracle表空间表分区详解及oracle表分区查询使用方法
Bottomsheetdialogfragment conflicts with listview recyclerview Scrollview sliding
通过rownum来进行区间查询
npm ERR code 500解决
谷歌AdMob广告学习
接口幂等性问题