OpenWrt: Finding Files Occupying the Largest Space

OpenWrt的find命令不支持-size +1M这种格式。所以我们如果想找分类出大于1M的文件,可以使用-size +1048576c来代替。
1048576是1MB的字节数,c表示计数的是字节。

1
find / -type f -size +1048576c -exec du -h {} \;    # 查找大于1M的文件

然后可以去删除不需要的文件,毕竟硬路由寸金寸土。

OpenWrt’s find command does not support the -size +1M format. Therefore, if we want to find files larger than 1MB, we can use -size +1048576c as a replacement.
1048576 is the byte count for 1MB, and c indicates counting in bytes.

1
find / -type f -size +1048576c -exec du -h {} \;    # Find files larger than 1MB

Then you can proceed to delete unnecessary files, as space is at a premium on hardware routers.


OpenWrt: Finding Files Occupying the Largest Space
https://tokisaki.top/blog/router-openwrt-common-operate/
作者
Tokisaki Galaxy
发布于
2024年2月9日
许可协议