我们常常在Linux下去查找文件

find / -name 'test.py'   # 在根目录下查找名为test.py的文件

但是如果用查找文件的方式去查找文件夹的话,是查不到的

find / -maxdepth 1 -type d  -name 'test_dictionary'  # -maxdepth表示搜索深度。-type表示搜索类型。

查找成功返回相应路径

相关文章:

  • 2022-12-23
  • 2022-02-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
  • 2022-12-23
猜你喜欢
  • 2021-06-03
  • 2022-12-23
  • 2022-12-23
  • 2021-08-09
  • 2021-11-12
  • 2021-07-17
  • 2022-12-23
相关资源
相似解决方案