

Mac/Linux 根据大小查找文件
source link: https://xmanyou.com/mac-find-file-by-size/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Mac/Linux 根据大小查找文件
利用find命令,可以查找相应大小的文件
find <path> -type f -size <size filter>
查找并列出所有文件的详细路径,则可以加上 -exec ls -l {} +
find <path> -type f -size <size filter> -exec ls -l {} +
其中,size filter的格式:
- 大于: +size
- 小于: -size
- 等于: size
size呢,则是由数字加上单位构成,单位包括:
- b : 512字节的块(block)
- c : 1个字节
- w : 2个字节(word)
举几个例子
- 查找0字节文件
find . -type f -size 0 -exec ls -l {} +
- 查找在10M和20M之间的文件
find . -type f -size +10M -size -20M
阿斌
Read more posts by this author.
Recommend
-
30
-
16
您现在的位置:首页 --> 系统运维 --> 根据文件大小删除一个特殊文件名的文件 根据文件大小删除一...
-
8
Linux 下按照文件大小查找文件 Apr 20th, 2020 为什么需要这篇文章 我想大概是这种情况,你的Linux 机器下磁盘满了,需要清理,然后就需要查找大的文件,确定是否有用进行删除。 查找500M以上的文件
-
5
ios根据音量大小生成波形图以及展示试听波形效果 ...
-
25
java中,如何根据一个class名称,查找对应的maven依赖 ...
-
6
使用 find 命令在 Linux 上查找文件和目录 | Linux 中国学习 find 命令的原因有很多。来源:https://linux.cn/article-1407...
-
8
...
-
6
大家好,我是林三心,用最通俗易懂的话讲最难的知识点是我的座右铭,基础是进阶的前提是我的初心REM布局 REM 是一个单位, REM布局 是以 REM 为基本的一种布局方式...
-
12
在 Linux 中查找文件和目录是任何系统管理员的基本技能。fd 命令是一个命令行工具,用于在 Linux 中查找文件...
-
8
V2EX › 问与答 chrome 如何高效的根据关键字快速查找并打开对应的标签页
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK