Linux下查询文件和文件夹

Linux下使用 find 命令查找文件或者文件夹:

1,查找文件:find /(查找范围) -name '查找关键字' -type d

find /usr/local/nginx -name 'nginx' -print

 2,查找文件夹:find /(查找范围) -name '查找关键字' -print

find /usr/local/nginx -name 'nginx' -type d

3,另外find 命令也可以通过正则表达式来进行查找

find /usr/local/nginx/ -name 'nginx.*'

 

posted @ 2021-05-12 15:04  tooker  阅读(10224)  评论(0编辑  收藏  举报