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

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

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

Linux下查询文件和文件夹

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

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

Linux下查询文件和文件夹

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

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

Linux下查询文件和文件夹

 

相关文章:

猜你喜欢
  • 2021-11-13
  • 2021-11-03
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
  • 2022-01-07
相关资源
相似解决方案