放个链接,万一有人关注呢
↓ ↓ ↓ ↓ ↓
find [path] [expression]
path是要搜索的起始目录路径,如果省略,则默认从当前目录开始搜索。expression是用于指定搜索条件的选项,可以是文件名、文件类型、大小、权限等。find /path/to/directory -type d
find /tmp -type d/tmp/tmp/subdir1/tmp/subdir2...
find /path/to/directory -type d -name "keyword"
find /tmp -type d -name "localhost"/tmp/localhost
find /path/to/directory -type d -user username
find /tmp -type d -user root
/tmp/rootdir
find /path/to/directory -type d -mtime -7
find /tmp -type d -mtime -7
/tmp/recentdir1/tmp/recentdir2
find /path/to/directory -type d -name "keyword" > result.txt
find /tmp -type d -name "localhost" > result.txt
/tmp/localhost

欢迎新的小伙伴加入!在这里,我们鼓励大家积极参与群内讨论和交流,分享自己的见解和经验,一起学习和成长。同时,也欢迎大家提出问题和建议,让我们不断改进和完善这个平台。
↓↓↓ 点个在看,无需赞赏!
原文作者:运维book思议;如有侵权,请联系管理员删除。