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.*'

原文地址:https://www.cnblogs.com/tooker/p/14759859.html