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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM