Cmd Generator

find

在目录层次结构中搜索文件。

find .

示例

# 按名称查找
find . -name "*.txt"

# 按类型查找
find /var/log -type f -name "*.log"

# 查找并执行
find . -name "*.tmp" -exec rm {} \;

# 查找空文件
find . -type f -empty

# 限制深度
find . -maxdepth 2 -name "*.md"

Sponsors