如何获取所有超过特定大小的文件并删除它们 [英] How to get all the files exceeding certain size and deleting them

查看:55
本文介绍了如何获取所有超过特定大小的文件并删除它们的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 我正在寻找一个Linux命令,要求
    从当前
    目录及其子目录中获取超过
    一定大小的所有文件。

  1. I am looking for a linux command to get all the files exceeding a certain size from the current directory and its sub-directories.

删除所有这些文件的最简单方法是什么?

Whats the easiest way to delete all these files?


推荐答案

类似于exec rm的答案,但是不需要为每个找到的文件使用进程:

Similar to the exec rm answer, but doesn't need a process for each found file:

find . -size +100k -delete

这篇关于如何获取所有超过特定大小的文件并删除它们的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆